Penguin
Annotated edit history of SoxNotes version 3, including all changes. View license author blame.
Rev Author # Line
2 zcat(1) 1 '' There's a huge colection of examples on soxexam(1) - zcat''
2
3 zcat(1) 3 Under linux, you can record just by catting from /dev/dsp or /dev/audio. These 2 devices behave in almost exactly the same way - the only difference is that by default /dev/audio uses m-law format while /dev/dsp uses 8 bit unsigned data by default. You can change these settings by using the ioctl(2) function.
1 JohnMcPherson 4
5 I use sox for converting between formats. Eg to play a raw file to the audio device:
6 sox -t ub sound.raw -t ossdsp /dev/dsp
7
8 The type "ub" is shorthand for unsigned bytes (8 bit samples). s means signed, and w means words (16 bit samples).
9
10 Here's how you might do a fade out:
11 sox -t wav sound.wav -e fade 0 0 3 -t ossdsp /dev/dsp
12 This will take your file named sound.wav, and do the effect named fade on it. The first 0 means no fade-in, the second 0 means stop the fade-out 0 seconds before the end, and the 3 means start the fade-out 3 seconds from the end. This gets output to the sound device.
13
14 Note - the above command has not been tested! So if it's wrong, please edit this page to correct it.