libmp3 now in cvs

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

libmp3 now in cvs

Post by rinco »

lib version of ps2mp3.
now in cvs.
top of readme:

What is it
~~~~
A wrapper around the libmad library that manages mp3 operations

What does it do
~~~~
You execute the PlayMP3 function with a filename and a callback.

The callback will be executed during the decoding of the mp3. Be sure
to return from this function quickly else the audio may stutter or freeze.
User avatar
Saotome
Posts: 182
Joined: Sat Apr 03, 2004 3:45 am

Post by Saotome »

nice,
i already had a look on the example (it plays an mp3 file from host) and was wondering if you could easily modify it to play an mp3-file from a memory buffer (i.e. you load the whole mp3 file into ee memory and play if from there).
thanks
infj
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

Playing from memory instead of a filesystem could be done...
But I'm not going to do it.
Although I will accept a patch.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Your request sounds nice
Open Source made me lazy
Send your patch or die
"He was warned..."
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Dark Lord Of the Sif,
May I call you mister brown?
You've gone haiku-coo.
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

ooPo wrote:Dark Lord Of the Sif,
May I call you mister brown?
You've gone haiku-coo.
Mod +1 Funny
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

Good work. I was going to work on somehting like this. Haven't had the time though.

I haven't looked at the source yet but does your library handle mp3s with tags?
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

no id3 yet,
but i am working on this,
do not heed the sif
Raizor
Posts: 60
Joined: Sun Jan 18, 2004 12:27 am
Location: out there

Post by Raizor »

rinco, you rocko!
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

madplayer with id3v2

Post by rinco »

i'll clean it up some and put in cvs tomorrow... here is some teaser output:

loadelf: fname host:bin/madplay.elf secname all
Input ELF format filename = host:bin/madplay.elf
0 00100000 0004c194 .....
Loaded, host:bin/madplay.elf
start address 0x1000e0
gp address 00000000
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
loadmodule: fname rom0:LIBSD args 0 arg
loadmodule: id 33, ret 0
loadmodule: fname host:irx/sjpcm.irx args 0 arg
loadmodule: id 34, ret 0
open name host:contrib/4.mp3 flag 1 data 41378
output: sample frequency 44100 Hz not available; using 48000 Hz
output: resampling 44100 Hz to 48000 Hz
Title: Numb/Encore(Live)
Artist: Jay-Z And Linkin Park
Album: Collision Course(DVDA)
8018 frames decoded (5124095576013384:31:33.9), +1.1 dB peak amplitude, 6762 clipped samples
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

I have checked into CVS the files I added/changed to compile the latest
versions of libid3tag, libmad and madplay. The original sources can be
obtained from the libmad website.

If you look at the changes to libmad and libid3tag you will see there is
barely anything to it! For the madplay application I created an sjpcm
audio output module, which I hope to get added to the core of madplay.

I also hacked in my first attempt at a timer using a vsync interrupt
handler (thanks gslib!).

I should probably state that the libmp3 library does not currently bind
against this new and improved player.

Requires zlib (from ps2-packer) and isjcmp. No more libsample nonsense.

And my mp3 of choice for testing stereo?...
Title: 360 Degrees (Oh Yeah?)
Composer: Alex Gifford
Artist: Propellerheads
Album: Decksandrumsandrockandroll [UK]
Track: 5/13
Year: 1998
Genre: Electronica/Dance
Encoder: iTunes v4.7.1
Post Reply