Jump to content
  • Advertisement
Sign in to follow this  
ajm113

"No Errors" WTH? - FMOD

This topic is 3933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

======================================== EDIT: I realized I posted in the wrong area can a moderator or Admin move this thread and delete this small edit message. -Sorry ======================================== Ok I am trying to create a game that has music playing that are in a mp3 format and for some reason FMOD keeps telling me their are no errors and closes my program. Here is the code: FMUSIC_MODULE *mod = NULL; //I was playing around with this. FSOUND_SAMPLE* handle; FSOUND_Init (44100, 32, 0); if (FSOUND_GetVersion() < FMOD_VERSION) { //printf("Error : You are using the wrong DLL version! You should be using FMOD %.02f\n", FMOD_VERSION); MessageBox(NULL, "You are using the wrong DLL version!\nYou should be using FMOD 2.0", "War Land FMOD Error",MB_OK | MB_ICONEXCLAMATION | MB_TOPMOST); exit(1); } // init if (!FSOUND_Init(44100, 64, 0)) { //MessageBox(NULL, "%s\n", FMOD_ErrorString(FSOUND_GetError())); MessageBox(NULL, FMOD_ErrorString(FSOUND_GetError()), "War Land FMOD Error!",MB_OK | MB_ICONEXCLAMATION | MB_TOPMOST); exit(1); } // load song srand((unsigned)time(0)); int random_integer2; for(int index=0; index<3; index++){ random_integer2 = (rand()%3)+1; if(random_integer2 == 1) { handle=FSOUND_Sample_Load (0,"Base/Sounds/Mandelgroove.mp3",0,0,0); }else if(random_integer2 == 2) { handle=FSOUND_Sample_Load (0,"Base/Sounds/Utne_Wire_Man.mp3",0,0,0); }else if(random_integer2 == 3) { handle=FSOUND_Sample_Load(0,"Base/Sounds/Above.mp3",0,0,0); }else{ handle=FSOUND_Sample_Load(0,"Base/Sounds/Above.mp3",0,0,0); } if (!mod) { MessageBox(NULL,FMOD_ErrorString(FSOUND_GetError()), "War Land FMOD Error!", MB_OK | MB_ICONEXCLAMATION | MB_TOPMOST); exit(1); } // play song FSOUND_PlaySound (0,handle); Can someone tell me whats going on? I am using OpenGL and used this code in the int main area. I did read this article for my problem A Quick Guide to FMOD

Share this post


Link to post
Share on other sites
Advertisement
Quote:
for some reason FMOD keeps telling me their are no errors and closes my program


hint:

FMUSIC_MODULE *mod = NULL;
...
if (!mod) { // print error status and exit }

^ mod is still NULL when you get here since you never change it in your code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!