83 lines · 1.7 KB · Text
RawDownload
#!/bin/sh tmp=/tmp/`basename $0`-$$input=$tmp.wav # no comment support check_file () {  ./sox --i -a $1 > $tmp.comments  cmp $tmp.comments $2 || exit 1} check () {  f=$1; shift  : > $tmp.expected  while [ $# != 0 ]; do    echo "$1" >> $tmp.expected    shift  done  check_file $f $tmp.expected} com0="Processed by SoX"com1="foo bar"com2="bar foo" ./sox -n $input trim 0 .1 ./sox $input $tmp.au # Apply default commentcheck $tmp.au "$com0" cp $tmp.au $tmp.comment.au cat > $tmp.i << .TITLE=First TrackARTIST=A BandALBUM=A Collection Of SongsTRACKNUMBER=01. ./sox $input --comment-file $tmp.i $tmp.comments.aucheck_file $tmp.comments.au $tmp.i ./sox $input --comment= $tmp.au # Don't apply default commentcheck $tmp.au ./sox $input --add-comment "$com1" $tmp.aucheck $tmp.au "$com1" ./sox $tmp.comment.au --add-comment "$com1" $tmp.aucheck $tmp.au "$com0" "$com1" ./sox $input --add-comment "$com1" --add-comment "$com2" $tmp.aucheck $tmp.au "$com1" "$com2" ./sox $tmp.comment.au --add-comment "$com1" --add-comment "$com2" $tmp.aucheck $tmp.au "$com0" "$com1" "$com2" ./sox $tmp.comments.au --comment= $tmp.aucheck $tmp.au ./sox $tmp.comments.au --comment "$com1" $tmp.aucheck $tmp.au "$com1" ./sox $tmp.comments.au --add-comment "$com1" $tmp.aucp $tmp.i $tmp.jecho "$com1" >> $tmp.jcheck_file $tmp.au $tmp.j ./sox $tmp.comments.au --add-comment "$com1" --add-comment "$com2" $tmp.auecho "$com2" >> $tmp.jcheck_file $tmp.au $tmp.j # FIXME: smp mp3./sox $tmp.comments.au $tmp.aiff./sox $tmp.aiff $tmp.flac./sox $tmp.flac $tmp.sf./sox $tmp.sf $tmp.ogg./sox $tmp.ogg $tmp.sndt./sox $tmp.sndt $tmp.sox./sox $tmp.sox $tmp.aucheck_file $tmp.au $tmp.i rm -f $tmp.*exit 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t