Return to Snippet

Revision: 16784
at August 15, 2009 17:23 by deepsoul


Initial Code
mkfifo aufifo
aplay -t raw -c 2 -f S16_LE -r 44100 aufifo &> /tmp/aplayfifo.log &
gmplayer -ao pcm:nowaveheader:file=aufifo track01.ogg track02.ogg track03.ogg &

Initial URL


Initial Description
`mplayer` (or its GUI cousin, `gmplayer`) does not natively support [gapless playback](http://en.wikipedia.org/wiki/Gapless_playback), which is what you want when playing sources which have songs crossing track boundaries (classical and some modern music).  In my experience the buffering Linux provides for named pipes is sufficient to bridge the gaps.

So the idea is to make `mplayer` output PCM data to a named pipe and use `aplay` to play the result.  The sample rate and format have to be known, because we have to disable wav headers which otherwise cause clicks.  There is a noticeable delay if you try to use the controls to skip forward or backward.

Initial Title
Gapless playback for mplayer (Linux)

Initial Tags


Initial Language
Bash