forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL_mixer problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
darkness



Joined: 15 Jun 2008
Posts: 121

PostPosted: Thu Jul 17, 2008 6:48 am    Post subject: SDL_mixer problem Reply with quote

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
View user's profile Send private message
whistler



Joined: 04 Mar 2008
Posts: 40

PostPosted: Thu Jul 17, 2008 6:56 am    Post subject: Reply with quote

lvorbisidec
Back to top
View user's profile Send private message
darkness



Joined: 15 Jun 2008
Posts: 121

PostPosted: Thu Jul 17, 2008 7:01 am    Post subject: Reply with quote

Ok, thanks! All resolved! ( i think )
Back to top
View user's profile Send private message
darkness



Joined: 15 Jun 2008
Posts: 121

PostPosted: Thu Jul 17, 2008 7:21 am    Post subject: Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jul 17, 2008 7:53 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group