Is there a way to concatenate together sound resources into a single stream (VS 2008). The way I am playing imported sound resources right now is:
This will play the imported resource named "click" in the background (asynchronously). However, I want to play sound1, sound2, and sound3 one right after the other. You would think you would just do it like so:
However, this does not work. Since it is played asynchronously what ends up happening is the last sound ends up playing as it steps on the other two. I can play them in the foreground with the "WaitToComplete" parameter instead of the "Background" parameter. However, in this case, it locks up the user interface as it is playing syncrhonously. The resources are of type/class: System.IO.UnmanagedMemoryStream
Is there some way I can concatenate the resources programatically so that I can play the concatenated stream in a single call to "Play" in the background?
Help is really appreciated on this.
Thanks,
Greg
Code:
My.Computer.Audio.Play(My.Resources.click, AudioPlayMode.Background)
This will play the imported resource named "click" in the background (asynchronously). However, I want to play sound1, sound2, and sound3 one right after the other. You would think you would just do it like so:
Code:
My.Computer.Audio.Play(My.Resources.Sound1, AudioPlayMode.Background)
My.Computer.Audio.Play(My.Resources.Sound2, AudioPlayMode.Background)
My.Computer.Audio.Play(My.Resources.Sound3, AudioPlayMode.Background)
However, this does not work. Since it is played asynchronously what ends up happening is the last sound ends up playing as it steps on the other two. I can play them in the foreground with the "WaitToComplete" parameter instead of the "Background" parameter. However, in this case, it locks up the user interface as it is playing syncrhonously. The resources are of type/class: System.IO.UnmanagedMemoryStream
Is there some way I can concatenate the resources programatically so that I can play the concatenated stream in a single call to "Play" in the background?
Help is really appreciated on this.
Thanks,
Greg