0
0

i have a problem with FMOD_System_PlaySound.

i create a sound like this:

FMOD_System_SetStreamBufferSize(pSystem,48*1024,FMOD_TIMEUNIT_RAWBYTES));
FMOD_System_CreateStream(pSystem,pchar(AData.AFileName),FMOD_SOFTWARE or FMOD_LOOP_OFF or FMOD_2D,nil,pSound));
FMOD_System_PlaySound(pSystem,FMOD_CHANNEL_FREE,pSound,true,pChannel));

this works fine, but after opening 10-15 MP3s, FMOD_System_PlaySound hangs, that meens, function does not return.

so my question is, what FMOD_System_PlaySound does internally?

thanx for help.

  • You must to post comments
0
0

It does many things.

That’s not nearly enough information. You’ll have to provide us with some code that actually demonstrates and reproduces the problem.

  • You must to post comments
0
0

I have the same problem, after I do playSound() exactly 14 times it stops playing audio and returns the error code FMOD_ERR_OUTPUT_DRIVERCALL.

Here is the code for the audio handling: http://pastebin.com/m515b5e29
and then I do MediaBank::Singleton().PlaySound("mysound.wav"); someplace else.

As I said, the 14’th time this is called, the error comes. Im thinking it has to do with channels. Is playSound(FMOD_CHANNEL_FREE, mySound, false, NULL); enough? Or do I have to have a system for channels also? According to the tutorials, it should work..

  • You must to post comments
0
0

It does work but as it says, your driver is complaining. switch to FMOD_SOFTWARE instead when creating your sounds.

  • You must to post comments
0
0

I found the problem, I never called System::update()

I hope that function isn’t very heavy, since I now call it every update!
BTW, how often do you have to call it?

  • You must to post comments
0
0

Ok forgot about that.
System::update is supposed to be called every frame.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.