[LAU] Input to aplay to make a file instead?

John Murphy rosegardener at freeode.co.uk
Sat Apr 18 12:05:49 CEST 2020


On Sat, 18 Apr 2020 09:55:12 +0100 Will Godfrey wrote:

> On Sat, 18 Apr 2020 09:50:30 +0100
> John Murphy <rosegardener at freeode.co.uk> wrote:
> 
> >I use a program which plays regions of various .wav files. Its
> >output pipes into aplay like: '| aplay -f FLOAT_LE -c 2 -r 48000'
> >
> >To where can I pipe its output, instead, to make a new .wav file,
> >or make a compressed file? Preferably faster than the region(s)
> >take to play.
> >
> >Or, if not, make aplay write to a file instead of playing?
> >
> >Thank you.
> >  
> 
> Use arecord instead.
> 

Thanks. I saw the -C switch (or arecord), but didn't try it because
the examples I've seen had hardware input.

It doesn't work though. A file gets created with a reasonable looking
header, but all zeros where the data should be and it never stops,
so I have to CTRL C.

If I simply '>' the input, which was going to aplay, to a file, it's
done in a flash. Unplayable, but the file contains data. Could I write
a header first somehow? Or a container format would be OK.

-- 
John.


More information about the Linux-audio-user mailing list