Re: Input to aplay to make a file instead?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

On 18/04/2020 12:05, John Murphy wrote:
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.

there are for sure "correct" ways to do it. If you want to use pure bash magic here you are:
Header of a wave file contains 44 byte. To extract it to a file use:

head -c 44 original.wav > header.bin

Now you can use your file from above (let's call it part.raw) and use:

cat header.bin part.raw > newname.wav

You should be able to play the new file. Be aware that the header is correct except for the length information. You might fix this with
wavfix (https://github.com/agfline/wavfix). Furthermore if your parts are not cut at a sample boundary (e.g. a normal wav file is stereo 16
bit per channel thus 4 byte per sample) you will get noise.

Gerhard
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux