How can I play multiple sounds at the same time using SharpDX in WinRT?

后端 未结 1 727
情歌与酒
情歌与酒 2021-01-16 11:18

I am trying to make a musical instrument type of application. The problem I am having is that a new sound will only play if the old one is finished. I would like to be able

相关标签:
1条回答
  • 2021-01-16 11:42

    You'll have to create (and preferably pool) multiple SourceVoice instances and play them back simultaneously.

    In fact, your current code should work, no? You may want to add a StreamEnd event listener to the SourceVoice to dispose of itself after playback is complete, and remember to enable callbacks when calling the constructor of the SourceVoice.

    0 讨论(0)
提交回复
热议问题