libxmp / xmp-cli

Command-line mod player using libxmp
GNU General Public License v2.0
75 stars 22 forks source link

Write WAV header to stdout #60

Closed HunterZ closed 1 year ago

HunterZ commented 1 year ago

Tried hooking this up as a decoder in liquidsoap to stream tracker music to an icecast server, but it seems that it always outputs raw samples to stdout even if I pick the WAV output driver.

liquidsoap really wants a WAV header for some reason. As a workaround, I was able to get it to work by running the output through ffmpeg to get a header slapped on, but that's obviously not ideal: xmp -b16 -c -f44100 --nocmd -Z #{string.quote(f)} 2>/dev/null | ffmpeg -f s16le -ar 44.1k -ac 2 -i pipe: -c:a pcm_s16le -f wav pipe: 2>/dev/null