All pastes #772718 Raw Edit

alesan

public text v1 · immutable
·published 2007-11-14 00:30 UTC
rendered paste body
pcm.test
{
        type plug
        slave {
                pcm "fo"
                format "U8"
                channels 1
                rate 8000
        }
}

pcm.fo {
    type file
    slave { pcm null }
    file filename
}


Experiment:

[1] $ mkfifo filename
[2] $ aplay filename

then, on another console:
[3] $ aplay -D test file.wav

the "file.wav" gets played by [3], gets resampled and written in a file named "filename" that happens to be a named pipe (fifo) created by [1], so that [2] can read it and play on the default device