0
0

I’m new to FMOD and I’m trying to add some sound effects to a game in Ogre. I’m programming in C++. I created some 2D sound effects to make sure I could get things running, and now I’d like to make some 3D ones for realism.

My problem is that whenever I call System::createSound() with the mode FMOD_3D, it returns FMOD_ERR_FORMAT (Unsupported file or audio format.) Here are my calls:

[code:lezhsen4]ERRCHECK( gSystem->createSound(".\sounds\laser_burst.wav", FMOD_3D, NULL, &gSoundLaser) );
ERRCHECK( gSystem->createSound(".\sounds\Thruster_Level_II.aiff", FMOD_3D, NULL, &gSoundThrusters) );[/code:lezhsen4]

Like I said, both sounds load and play if I use FMOD_2D, but not FMOD_3D. I even tried copying the code from the 3D example and it still won’t load! Can anyone lend a hand please?

edit: I discovered that when I try to load the sound file "drumloop.wav" that comes with the FMOD examples it loads. Can only certain audio files be played as 3D sounds? And if so, how can you tell (since I’m also trying to load a .wav file and it isn’t working)?

  • You must to post comments
0
0

Your sounds are probably stereo and you’re trying to load them using hardware (the default). Use FMOD_SOFTWARE to get it to work and please check the tutorials and documentation.

  • You must to post comments
0
0

Thanks, that did the trick. I did go through the manual and documentation, but I’m no audio guru and I don’t understand a lot of this stuff, so I didn’t see my problem in there. I had no idea my sound files were stereo.
What would be the best way to test for this in code without knowing ahead of time that this is the case? Should I try just doing FMOD_3D first, and if it returns FMOD_ERR_FORMAT then try FMOD_SOFTWARE | FMOD_3D?

  • You must to post comments
0
0

just use FMOD_SOFTWARE all of the time. You will not get any advantage using hardware support , just the disadvantage of driver issues.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.