I'm trying to write some simple mp3 player in c, I want to use libmad to decode the mp3 file and then output decoded audio using alsa, I have looked on sorces of some applications but most of them are too advanced, all I want is to simply play single mp3 file. I have readed some alsa examples [http://equalarea.com/paul/alsa-audio.html], I have tried it and it have worked, I undstood how this works, but I'm unable to get some simple source where is explained how to decode mp3 file using libmad, and also I would like to know how to play that decoded mp3 using alsa.

I would appreciate if someone could give me some simple, working sample code.