Playing two sounds simultaneously c#

后端 未结 2 1536
-上瘾入骨i
-上瘾入骨i 2020-12-11 21:06

I am creating a WP7 application that requires various sound effects to be played (on button press) over looped background music. The background music is initiated by pressin

2条回答
  •  爱一瞬间的悲伤
    2020-12-11 21:15

    You will need to play each sound from a separate thread.

    What seems to be happening here is that the different Play method calls are interfering with each other since they are in the same thread.

    Try just putting the background music in a separate thread and see if that solves the problem you mention in the question. If so, split the others out as well.

提交回复
热议问题