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 

Compile libmp3 with ps2sdk

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



Joined: 21 Jan 2004
Posts: 47
Location: Spain

PostPosted: Tue Feb 22, 2005 9:21 pm    Post subject: Compile libmp3 with ps2sdk Reply with quote

Hiz.

Anyone knows how I can to compile libmp3 only with ps2sdk... it's possbile?

in makefile I see:
EE_LIBS += -lfileXio -lsample -lmad -lpad -lgs -lm -lcdvdfs -lc -lkernel -lsyscall -lc

    where...
    -lfileXio (ok, in ps2sdk)
    -lsample (what?????)
    -lmad (ok, included with libmp3)
    -lpad (ok, in ps2sdk)
    -lgs (What!!!!!! gs in sound lib?????)
    -lm (from newlib???)
    -lcdvdfs (ok, in ps2sdk)
    -lc (ok, in ps2sdk)
    -lkernel (ok, in ps2sdk)
    -lsyscall (ok, in ps2sdk)


in the past I allways get a caotic installation with ps2lib + newlib + other random libs.... but now I'm working with a clear installation of ps2sdk, without any external libs

I install only the libs that I need... so what I need to compile this?
thanks men!!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
neofar



Joined: 21 Jan 2004
Posts: 47
Location: Spain

PostPosted: Tue Feb 22, 2005 10:58 pm    Post subject: Reply with quote

I download 'libcdvd' and correct some make sentences... and now I compile the lib, and the sample only give me 2 erros:

Code:
libmp3.o(.text+0xbbc): undefined reference to `ls_get_resampler'
libmp3.o(.text+0xc18): undefined reference to `ls_resampled_size'


I search this functions in libmp3 sources and libmad sources, but only found the declaration in sample.h

in this file I see this line "libsample - audio sample convertion/mixing library" ..... this it's the -lsample ..... where it's this library?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Tue Feb 22, 2005 11:14 pm    Post subject: Reply with quote

libsample is what resamples audio from whatever the file is (44.1kHz for instance) to 48kHz which is required by sjpcm.irx.

libsample.a and libcdvdfs.a are in cvs under:
libmp3/contrib/lib/attic

speaking to rinco on irc, he mentioned something about compiling libmad with resampling included, hence libsample being left to the attic... not sure why it's still needed, in that case.

might also be worth looking at
cvs/ps2sdk-ports/[ libmad madplay]

i couldn't get these to fully compile, but may still be useful
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
neofar



Joined: 21 Jan 2004
Posts: 47
Location: Spain

PostPosted: Wed Feb 23, 2005 1:17 am    Post subject: Reply with quote

I see both libsample.a and libcdvdfs.a browsing cvs... I will try it
I'm downloading the ps2sdk-ports repository... will try to recompile libmad
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Wed Feb 23, 2005 1:58 pm    Post subject: Reply with quote

please forgive my lack of instructions and read
http://forums.ps2dev.org/viewtopic.php?t=1047

if you are interested in using madplay with your demo
then just patch main() to something like play_mp3()
and away you go. but be careful. it's GPL, so you may
want to avoid mixing it with AFL code.

if you plan on distributing a binary; then you could compile
madplay such that it can be executed by pkoLoadElf(). i've
done this and it works great.
Back to top
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Wed Feb 23, 2005 2:34 pm    Post subject: Reply with quote

I should probably also explain this craziness...

Quote:
-lsample (what?????)
-lgs (What!!!!!! gs in sound lib?????)


I started off libmp3 by attempting to collate all the features of the
libmad derivatives that are floating about. Then I decided to start
from scratch*...

The result is what you find in ps2sdk-ports/{libid3tag,libmad,madplay}:
a port that doesn't depend on -lsample or -lgs and interprets id3v2 tags.
I also think my use of threads is simpler, sexier and faster.

libmp3 remains an abomination for now.

* I kept bstdfile.c/file.c/directory.c/rmalloc.c because they are nice, but
I'm not sure if bstdfile is GPL compatible.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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