0
0

Hi,

i m new to fmod, and i want to know, how can i play a sound on a stero or 5.1 sound system, I mean : All speakers should play a sound, but exactly the same from a stereo wav and the only thing i want is to be able to use the setSpeakerMix function to set the exact output level of my sound in realtime. I know i can do it with the flag FMOD_3D when i create my sound, but in this case i cant use the setSpeakerMix function. Or i can also change the pcm stream itself, but its not a very convinient solution, and i think there is a better way to do it.

thanks for your answer

  • You must to post comments
0
0

Hi,
I use setSpeakerMix, which is very easy to use :

initialize fmod :
FMOD_System_Create(sys)
FMOD_System_SetSpeakerMode(sys, SpeakerMode) : must be called before FMOD_System_Init and after FMOD_System_Close. To apply a system 5.1 for example you have : SpeakerMode = FMOD_SPEAKERMODE_5POINT1
FMOD_System_Init(sys, 10, FMOD_INIT_NORMAL, FMOD_OUTPUTTYPE_AUTODETECT)

play a stream :
example for the Mode = FMOD_2D + FMOD_SOFTWARE + FMOD_LOOP_OFF + FMOD_MPEGSEARCH + FMOD_ACCURATETIME + FMOD_CREATESTREAM
Note that you must use : FMOD_2D and FMOD_SOFTWARE for FMOD_Channel_SetSpeakerMix, see the documentation.
FMOD_System_CreateSound(sys, "c:\mysong.ogg", Mode, exinfo, SoundPtr)
FMOD_System_PlaySound(sys, 1, SoundPtr, 0, Channel)
FMOD_Channel_SetSpeakerMix(Channel, 0.75, 0.75, 1.2, 1.3, 0.9, 0.9, 1, 1)

Here is only an exmaple.
I hope not to have made any mistake.

Denis
http://www.CoinsHifi.com

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.