0
0

Hi,
I’m seeing some FMOD behavior that I am at a loss explaining while playing the same sample more than once at the same time. Since I am using FMOD from python (and through a simple OO interface I wrote for it), I cannot show you the exact code, but here is generally what I am doing:

[code:2084ezu6]
...
// define channel, handle
// load a file as a sample and store its handle in handle
channel = FSOUND_PlaySound(FSOUND_FREE, handle)
delay(100)

channel = FSOUND_PlaySound(FSOUND_FREE, handle)
delay(100)

channel = FSOUND_PlaySound(FSOUND_FREE, handle)
delay(100)

channel = FSOUND_PlaySound(FSOUND_FREE, handle)

wait for keypress

FSOUND_StopSound(self.channel)
[/code:2084ezu6]

What I was expecting to see (hear) was only the last channel stopping, since the variable channel is overridden each time the sample is played. What happens, however, is that all channels in which the sample is playing are stopped.

This is actually quite convenient, but why is it happening – what am I missing here?

  • You must to post comments
0
0

Solved. I accidently commented out the last two lines before FMOD is shut down…

effectively:
[code:1lcfhg7k]
...
...
...

wait for keypress

FSOUND_StopSound(channel)

FSOUND_Close()
[/code:1lcfhg7k]

Sorry about that. In my defense, it’s midnight.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.