Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Write My Own MP3 Decoder?

This thread is locked; no one can reply to it. rss feed Print
Write My Own MP3 Decoder?
Billybob
Member #3,136
January 2003

I'm looking for good resources on writing my own MP3 decoder. Sounds silly, I know. This is for an embedded system. I don't think mpg123 will compile easily for an embedded system.
I'd prefer not to read through the whole spec trying to figure out the decoder myself. Anything to help me along would be awesome.

Thanks!

Marco Radaelli
Member #3,028
December 2002
avatar

Quote:

This is for an embedded system.

What about using an hardware decoder?

Thomas Fjellstrom
Member #476
June 2000
avatar

libmad has a integer decoder for those devices with no floating point support.

But yeah, if you have the option of using a hardware decoder, do it. Sparkfun sells some :)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Spyridon Gulgas
Member #8,150
December 2006

MP3 Decoder... what do you mean by that:

like a MP3 File Parser (some programs have those)
or a Codec (Play Em!)

google a program called MPXPlay. made in OpenWatcom 1.30 emulates every Soundboard with OGG\MP3\WMA\ect. support! Source Available! Get IT!

I know some OS's if needed that work under ROM:

FreeDOS - Good ol' DOS, the mighty Allegro Started on DOS!

DSL - A VERY FREAKIN SMALL Linux DISTRO!!! CLI and no packs (for minumum download)!

DOS Alive, DOS Community and Restoration project
http://dosalive.awardspace.com
------------------------------
Want your games Ported to DOS? well... TOO BAD Ya gonna have to wait for my DOSAlive gmail account to go up!!! :) Site in BETA

Michael Jensen
Member #2,870
October 2002
avatar

Using a hardware decoder is the best option for embedded devices since they've got almost no processing power/memory to speak of.

I'm curious though: would the device need to be able to parse the files at all? Or can you just send an entire .mp3 file straight to the chip raw?

ImLeftFooted
Member #3,935
October 2003
avatar

I've heard it is very hard to do. (sorry I can't be more helpful :P)

Michael Jensen
Member #2,870
October 2002
avatar

Wow, $11! -- I remember seeing the "build it yourself mp3 player" project back in like 99 or so, and the IC you had to buy was like $60+ (the total parts cost was around $110, IIRC)

Billybob
Member #3,136
January 2003

Well I wanted to do it in software so I can save money on the chip. It's not $11, it's $11 + the cost of all the components needed to drive it. Timing crystal, resistors, capacitors, board, power supply, etc, etc. Sparkfun does have this breakout board with everything, for $40.

I suppose that's what I'll go with since it's easiest. It's an unfortunately large amount of my budget though :-/

Marco Radaelli
Member #3,028
December 2002
avatar

Well, if you go for the software way, you'll anyway need a cpu, maybe it would be less expensive, but then you'll need the circuitry to program it :)

Quote:

I don't think mpg123 will compile easily for an embedded system.

I don't know on which dependencies it relies on, but IIRC gcc can cross-compile to arm processors.

Go to: