I'm learning how to use the SDL libraries but I'm having a small problem playing the sound. The program appears to load the sound but either not play it or play it too low for me to hear. Here's my code so far:
#include "SDL/SDL.h"
#include "SDL/SDL_mixer.h"
Mix_Music *play_sound = NULL;
void cleanUp()
{
Mix_FreeMusic(play_sound);
Mix_CloseAudio();
SDL_Quit();
}
int main(int argc, char* args[])
{
SDL_Init(SDL_INIT_EVERYTHING);
Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096);
play_sound = Mix_LoadMUS("noise.mp3");
Mix_PlayMusic(play_sound, -1);
cleanUp();
return 0;
}
I'm using Dev-Cpp with these linker arguments:
-lmingw32 -lSDLmain -lSDL -lSDL_mixer
and I have the proper .dll's in the folder with my project along with the actual .mp3. Any suggestions?