Sign in to follow this  
discodowney

fmod issue

Recommended Posts

Im just starting to use fmod. dont really need anything spectacular, some simple sounds and background music. Ive been tryin to just get a simple background music goin but i cant find any tutorials really. Found one that was made back in 2004, so its prob out of date, hence my problems but can someone help me with the following? Im using DirectX. So i have a method called play() that starts the music. should that be in the display loop or before it? Also im getting a lot of errors. Here is the code. #include "fmod.h" #include "fmod_errors.h" #include <conio.h> #include <stdio.h> /* Global variables */ class gameSound { private: IDirect3DDevice9* Device; FMUSIC_MODULE* handle; public: gameSound() {}; void play(); }; void gameSound::play() { FSOUND_Init (44100, 32, 0); // load song handle=FMUSIC_LoadSong ("canyon.mid"); // play song only once // when you want to play a midi file you have to disable looping // BEFORE playing the song else this command has no effect! FMUSIC_SetLooping (handle, false); // play song FMUSIC_PlaySong (handle); } errors i get are. MNostly that it cant find identifiers. I imagine theres something i havent set up properly. All the includes seem fine though. 1>c:\users\downey\college\game programming\pc and xbox\alienattack\gamesound.cpp(5) : error C3861: 'FSOUND_Init': identifier not found 1>c:\users\downey\college\game programming\pc and xbox\alienattack\gamesound.cpp(8) : error C2065: 'handle' : undeclared identifier 1>c:\users\downey\college\game programming\pc and xbox\alienattack\gamesound.cpp(8) : error C3861: 'FMUSIC_LoadSong': identifier not found 1>c:\users\downey\college\game programming\pc and xbox\alienattack\gamesound.cpp(13) : error C3861: 'FMUSIC_SetLooping': identifier not found 1>c:\users\downey\college\game programming\pc and xbox\alienattack\gamesound.cpp(16) : error C3861: 'FMUSIC_PlaySong': identifier not found EDIT: I have added the dll's, fmodex.dll, fmodexL.dll and fmodexp.dll, to the debug folder of my project. And in the project folder aswell. Still didnt fix it [Edited by - discodowney on March 17, 2010 6:25:01 AM]

Share this post


Link to post
Share on other sites
I think they changed the API a while back. I remember trying to compile a specific project and discovering I needed version 375 of FMOD to do it. Try find that old version or figure out the new equivalent functions I guess.

Share this post


Link to post
Share on other sites
It's been a year or 2 since I used fmod but I do remember just the help files being extremely ... helpful. They answered most of my obvious questions. For deeper more complicated stuff, the forums on fmod's site are good as well, and you will usually get a fairly speedy answer (though this is more of a help-file type of question).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this