Does the FMOD sound api only do 3D sound with wav files? I tried doing positional 3D sound with an mp3, but it doesn't seem to want to work, but when I run essentially the same code with wave, boom, 3D positional sound.
Does the FMOD sound api only do 3D sound with wav files? I tried doing positional 3D sound with an mp3, but it doesn't seem to want to work, but when I run essentially the same code with wave, boom, 3D positional sound.
Sorry bud I don't use fmod. But I will send you my DX sound class if you'd like (when it's done). Since you use OpenGL you will have to pass the HWND of the window you are rendering on to the constructor. But it will work even though you are using GL to render - DirectSound doesn't care. Also I'm working on the code for an MP3 player myself - the 3D sound portion is really just a state you change within the API. So once the player works, 3D sound will be a snap - probably one function call.
from the fmod 3.7.1 documentation:
"You do this when loading wav, raw, mp3, etc samples, through the following function."
more example code:
Code:do { UpdateGame(); // here the game is updated and the sources would be moved with FSOUND_SetAttributes FSOUND_3D_Listener_SetAttributes(listenerpos, listenervel, fx, fy, fz, tx, ty, tz); // update 'ears' FSOUND_Update(); // needed to update 3d engine, once per frame } while (gamerunning);
mrrr.....i think this stupid thing changed my font color......meh
hope that helps. I'm pretty sure you can use 3d sound with any format, just set it up with your window
-edit-
MRAAAAAAAAA. stupid wysiwyg editor, i can't change anything about the code tags, can't figure out the stupid buttons
Last edited by jverkoey; 04-04-2004 at 05:40 PM.
Bubba, interestingly FMOD hands DirectX functionality to the programmer behind the scenes. In essence, I'm already using DirectSound. Tell me if you can get 3D positional sound with mp3 format working. I wouldn't be surprised if you can't.
Jeff, I've read that 90 billion times lol. I was wondering, may I see your fmod class?
I appreciate the responses. For right now I'm glad I've got 3D sound with just wave. This leads to another question: how do I freaking make it so that the sound isn't greatly attenuated? I.e when I'm really freaking close to a sound emitter, it disappears! I've tried using the SetFactorDistance with the FMOD library, which asks "how many units is a meter", which is 1 by default, but 85.3 in my engine (26 units is a foot in my engine), but it sitll doesn't work. a digipen programmer said that he had been having error with his engine (somethign was supposedly improperly documented or error prone in the api).
Anyway, I thank you both for da help