0
0

I’ve used the FMOD engine in two projects successfully, and I’ve never run into this problem until now.

I am blending between two different streamed sounds as time passes in my application. Specifically, I have 4 .mp3 files. Each one plays for about a minute, and then I play the next file, gradually decreasing the volume of the old stream and gradually increasing the volume of the new stream. When the volume of the old stream is 0, I stop it.

I use FSOUND_Stream_Play and specify FSOUND_FREE for the channel. The algorithm works perfectly except for when I get to the transition period between the second and third .mp3 files.

For some reason, when I call FSOUND_Stream_Play on the third file, the second file stops play INSTANTLY, which makes no sense to me. I looked at the channels returned for the second and third files, and they are different, although I suppose they might be the same channel with a different reference count.

I wondered if it might be that I had run out of channels, so I specifically set the second file priority to 255, and that didn’t work.

Thanks for some advice or ideas. Have I overlooked something simple, or are there cases when I should expect this type of behavior?

  • You must to post comments
0
0

Brett, the problem is solved. I swapped FSOUND_HW2D for FSOUND_2D when I loaded the stream. I was also specifying FSOUND_LOOP_NORMAL. Don’t know if this means anything important to you or not, but I don’t remember ever getting anything beneficial from FSOUND_HW2D in my app, so I’m fine without it.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.