PDA

View Full Version : Using libmad to play mp3 files with freepascal?



paul_nicholls
29-05-2007, 11:16 PM
I am wondering if anyone has ever ported the libmad (http://www.underbit.com/products/mad/) mpeg audio decoder so it can be used with freepascal?

I am wanting to make a simple mp3 player and this library sounds great as it uses fixed-point math instead of floating-point. This would make it suitable for use on the gp2x.

cheers,
Paul.

dmantione
30-05-2007, 05:04 AM
Do you have a license on the mp3 patents? If no, I wouldn't touch my hands on mp3.

paul_nicholls
30-05-2007, 05:11 AM
Do you have a license on the mp3 patents? If no, I wouldn't touch my hands on mp3.

would free, open source programs using mp3 decoders need licensing?

cheers,
Paul.

dmantione
30-05-2007, 06:08 AM
Yes, they do. The bad thing with mp3 is that the patent owners are intentionally vague about what uses require licenses from them. They seem not so interrested in hobby activities, but more in "products", if your program, open source or not, free or not, looks like a product, they demand money.

paul_nicholls
30-05-2007, 06:39 AM
Yes, they do. The bad thing with mp3 is that the patent owners are intentionally vague about what uses require licenses from them. They seem not so interrested in hobby activities, but more in "products", if your program, open source or not, free or not, looks like a product, they demand money.

D'OH! :(

maybe I will try Ogg format instead.

thanks
Paul.

savage
30-05-2007, 07:14 AM
SDL_Mixer supports Ogg apparently, though I have not used it personally.

DarknessX
05-06-2007, 09:55 PM
The BASS audio engine works great, can encode/decode streams, samples, and even create its own. With plugins works with .wma, and without, supports MP3, MP2, MP1, OGG, WAV, AIFF, also supports MOD Music, XM, IT, S3M, MOD, MTM, UMX, MO3 Music (MP3/OGG compressed MODs) and is all under 100kb in size. It takes some effort to get working, and for some features requires a {$mode delphi} switch, but otherwise, works perfect.

DJMaster
12-09-2016, 07:08 PM
You can take a look at the mpg123 header binding for the Free Pascal Compiler:

https://github.com/DJMaster/mpg123-fpc

Strongly tested under Windows. Other OSs will be availble soon.


http://www.djmaster.com/images/freepascal/Dubstep.png



I am wondering if anyone has ever ported the libmad (http://www.underbit.com/products/mad/) mpeg audio decoder so it can be used with freepascal?

I am wanting to make a simple mp3 player and this library sounds great as it uses fixed-point math instead of floating-point. This would make it suitable for use on the gp2x.

cheers,
Paul.