Thanks guys, mp3 player running

22 Nov 2010

Thanks to all developers, I haven't seen such a platform before.

Got an MP3 up after 2 days without any additional hardware. Playing even 320k MP3 from an USBstick without hickups.

OK, code is yet too dirty to publish, but all has been done in software.

The numbers w/o optimization of any kind:

128k 3min MP3 is decoded in 1:21 -> cpuload ~50%

320k 4:30min MP3 is decoded in 3:00 min

DAC is fast enough to keep up.

Files are read from USB stick with MSCFileSystem.

I haven't expected this performance and I write this topic to thank you guys, who built this piece of hardware and all you guys who made the underlying software.

22 Nov 2010

I would like to see how you did it. Can you post your schematic and code when you cleaned it up?

22 Nov 2010 . Edited: 22 Nov 2010

I would also like to know how you did that without additional hardware and accept a spaghetti code. Come on let us have a look on it.

23 Nov 2010

Awh shucks! I wanted to be the first to do so, I managed to compile and link to both Helix and libmad as preliminary tests.

But then when I got to the DAC bit I blanked out trying to figure out i2s. So - no additional hardware. You used the internal analog out? Then you would not have stereo? The thing about the external DAC is figuring out the clocking timing. Please explain 4.30min mp3 decoded in 3.00 minutes. Does it playback in 3.00 minutes or is there a way that you are able to keep the playback down to real time.

Sweet, can't wait to see this. A nice beginners hello world project would be playing back a mp3 from the mbed drive, with no additional h/w.

23 Nov 2010

Hi,

I also try this. But running in trouble. Could you please share your experience

Br

 

23 Nov 2010

Thanks for your interest. Well, I am stuck in a little dilemma because I will use the code as a building block for an entry in the Elektor/Circuit Cellar contest. But, good news, I decided to publish the code anyway. For anyone using the code in the contest, please include a reference to my project number, which I will publish then.

Please give me a few days to clean up, the code is still cluttered with debugging stuff. It was really hard to get it running.

The details: the decoder is a modified version of libmad (the standard version allocates too much RAM), the output is at the moment only one channel via the internal DAC. I will change  this to stereo, but maybe not in the next days. ID tags are ignored and generate some errors and noise but only at the beginning and end of the file.

@Vis: decoding a 4:30 file in 3:00 is the decoding process without output. Output needs a fixed rate od 44100 Samples/sec, so the decodr has to wait for the output to finish. It simply means the decoder is fast enough to decode a 320kB/s file without any pauses and there is still time for additional tasks.

I will post a new topic when I created the project here on the website.

Stay tuned.

24 Nov 2010

I'd love to see this! (Especially after my nay-saying regarding the topic haha)

24 Nov 2010

What about FLAC and maybe even ogg?

24 Nov 2010
user Andreas Grün wrote:

Thanks for your interest. Well, I am stuck in a little dilemma because I will use the code as a building block for an entry in the Elektor/Circuit Cellar contest. But, good news, I decided to publish the code anyway. For anyone using the code in the contest, please include a reference to my project number, which I will publish then.

Please give me a few days to clean up, the code is still cluttered with debugging stuff. It was really hard to get it running.

The details: the decoder is a modified version of libmad (the standard version allocates too much RAM), the output is at the moment only one channel via the internal DAC. I will change  this to stereo, but maybe not in the next days. ID tags are ignored and generate some errors and noise but only at the beginning and end of the file.

@Vis: decoding a 4:30 file in 3:00 is the decoding process without output. Output needs a fixed rate od 44100 Samples/sec, so the decodr has to wait for the output to finish. It simply means the decoder is fast enough to decode a 320kB/s file without any pauses and there is still time for additional tasks.

I will post a new topic when I created the project here on the website.

Stay tuned.

What about of use PWM (6) like DAC?

26 Nov 2010

Guys, I published the program here:

madplayer

Have fun

09 Feb 2012

Hey, thanks for posting this, hope you are still using the mbed software this year. I have been trying to use your code to output a 320k mp3 song, however it says 'lost sync', but i am sure that my file is <640kb. Is it possible to know what the problem is with the code?

Thank you very much:) Yiyi