| View previous topic :: View next topic |
| Author |
Message |
darkness
Joined: 15 Jun 2008 Posts: 121
|
Posted: Thu Jul 17, 2008 6:48 am Post subject: SDL_mixer problem |
|
|
Excuse me, I've tryied to write a simple music player with SDL_mixer, but when I've try to compile the project I've a lot of errors, what lib I've to include?
| Code: |
undefined reference to `SDL_LoadWAV_RW'
undefined reference to `SDL_FreeWAV'
undefined reference to `SDL_FreeWAV'
undefined reference to `SDL_MixAudio'
undefined reference to `SDL_MixAudio'
undefined reference to `ov_time_seek'
undefined reference to `ov_clear'
undefined reference to `SDL_MixAudio'
undefined reference to `ov_read'
undefined reference to `ov_info'
undefined reference to `ov_open_callbacks'
undefined reference to `ov_open'
undefined reference to `SDL_MixAudio'
undefined reference to `ov_open_callbacks'
undefined reference to `ov_info'
undefined reference to `ov_pcm_total'
undefined reference to `ov_read'
undefined reference to `ov_read'
undefined reference to `ov_clear'
|
And here is the lib that I've linked:
| Code: |
LIBS = -lSDL -lSDL_image -lSDL_gfx -logg -lvorbis -lsmpeg -lmikmod -lSDL_mixer -lpspgum -lpspgu -lpng -lz -lm -lpspumd \
-lpspusb -lpspusbstor -lpsppower -lpsprtc -lpspusbdevice \
-lpspsystemctrl_user -lpspkubridge -ljpeg -lpsphprm -lpspaudiolib \
-lpspaudio -lmad
|
|
|
| Back to top |
|
 |
whistler
Joined: 04 Mar 2008 Posts: 40
|
Posted: Thu Jul 17, 2008 6:56 am Post subject: |
|
|
| lvorbisidec |
|
| Back to top |
|
 |
darkness
Joined: 15 Jun 2008 Posts: 121
|
Posted: Thu Jul 17, 2008 7:01 am Post subject: |
|
|
| Ok, thanks! All resolved! ( i think ) |
|
| Back to top |
|
 |
darkness
Joined: 15 Jun 2008 Posts: 121
|
Posted: Thu Jul 17, 2008 7:21 am Post subject: |
|
|
Excuse me, I've a new error :(...
I've tryied to load a simple MP3 but I've have ever error "Module format not recognized"...
But the file is not corrupted, if I try to load it with another MP3 player the file is correctly loaded!!!
| Code: |
Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 2, 4096*3 );
Mix_Music *music = NULL;
music = Mix_LoadMUS(target);
if(music == NULL)
{
Init();
printf("\nError: %s", Mix_GetError());
sleep(2000000);
}
Mix_PlayMusic( music, -1 );
|
|
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Jul 17, 2008 7:53 am Post subject: |
|
|
| darkness wrote: | Excuse me, I've a new error :(...
I've tryied to load a simple MP3 but I've have ever error "Module format not recognized"...
But the file is not corrupted, if I try to load it with another MP3 player the file is correctly loaded!!!
| Code: |
Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 2, 4096*3 );
Mix_Music *music = NULL;
music = Mix_LoadMUS(target);
if(music == NULL)
{
Init();
printf("\nError: %s", Mix_GetError());
sleep(2000000);
}
Mix_PlayMusic( music, -1 );
|
|
SDL_Mixer doesn't recognize mp3 unless you compile it along with SMPEG, which requires your app to be C++ as SMPEG is C++. So you either use C++ for ALL your SDL apps, or use something other than mixer to play mp3. |
|
| Back to top |
|
 |
|