Does fmod only support 3D sound with .wave?

This is a discussion on Does fmod only support 3D sound with .wave? within the Game Programming forums, part of the General Programming Boards category; Does the FMOD sound api only do 3D sound with wav files? I tried doing positional 3D sound with an ...

  1. #1
    Banned
    Join Date
    Jan 2003
    Posts
    1,708

    Does fmod only support 3D sound with .wave?

    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.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    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.

  3. #3
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    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.

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 02:49 PM
  2. Dev-cpp - compiler options
    By tretton in forum C Programming
    Replies: 7
    Last Post: 01-06-2006, 05:20 PM
  3. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 12:58 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  5. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 03:33 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21