Search code examples
linuxperlaudiomp3

How to output MP3s to a sound card


I'm trying to write some code in perl (specifically) to output sound (specifically, MP3s) to my sound card. I've not seen any examples of outputting any sound to the soundcard in perl, so examples of that would be helpful.

My question is, how do audio players output sound to the sound card? Do they convert them to WAV on the fly?


Solution

  • SDL::Sound solves this problem for WAV files. There are several packages for converting compressed MP3 files to WAV, such as Audio::MPEG and Audio::ConvTools.