FSOUND_Stream_PlayEx always returns the same channel each time it is invoked with the paused option = TRUE. I can only play one stream at a time with this option.

However, it returns a different channel each time when it is invoked with the paused option = FALSE. This allows me to play multiple streams at a time.

I am using the FSOUND_FREE option.

Is this behaviour expected?

  • You must to post comments

I have tried using wav files and mp3 files and have the same result.

I have a function similar to the following:

void playSimpleSound(char * szFileName)

// Open new stream
pStream = FSOUND_Stream_OpenFile(szFileName, FSOUND_2D, 0);

// Play stream (paused)
channel = FSOUND_Stream_PlayEx(FSOUND_FREE, pStream, NULL, TRUE);

// For some reason channel == 0 here

// Set stereo pan

// Unpause stream
FSOUND_SetPaused(channel, FALSE);


If I call this function multiple times with different filenames, then the first stream only is played and nothing else is heard until the first stream has stopped playing. I only hear one stream at a time.

If however, I don’t start the stream paused (or I just call FSOUND_STREAM_Play), then there is no problem and I can hear all the sounds.

However, I made a mistake in my last post. In fact channel 0 is always being returned from the play stream in the above function even when more than 1 sound is playing at the same time. This is really strange because I use FMod in another part of my code also using streaming sounds and it is returning channel numbers like 4096, 4097 etc… This makes me think it is a problem with my code.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.