diff options
author | Erich Eckner <git@eckner.net> | 2016-05-26 23:17:15 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-05-31 11:38:35 +0200 |
commit | 5371ded1b2267716980230fbe31fdb69d8fe7850 (patch) | |
tree | 539819ac4381c6d6c6c3909a638afeddf42201f1 | |
parent | 8f3c6ed2c84addc7253c5bd458eb223baa168fcf (diff) | |
download | sound-cutter-5371ded1b2267716980230fbe31fdb69d8fe7850.tar.xz |
CD-Ausgabe ergänzt nun ggf. den allerletzten Track
-rw-r--r-- | sound-cutter.in | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sound-cutter.in b/sound-cutter.in index 2bdb880..26dd07b 100644 --- a/sound-cutter.in +++ b/sound-cutter.in @@ -334,9 +334,22 @@ do trimcmd="${trimcmd}trim 0s =${outTimes[${i}]}s : " ${newFile[${i}]} && trimcmd="${trimcmd}newfile : " done +trimcmd="${trimcmd%: }" [ ${outRate} -ne ${inRate} ] && remixcmd="${remixcmd} rate -v ${outRate}" -${cdAusrichten} && output="-b 16 ${output}" +if ${cdAusrichten} +then + output="-b 16 ${output}" + gesZeit=$[ \ + $(timetosample "${outRate}" $(echo "${firstline}" | awk '{print $2}' | tr '=' ' ')) \ + - $(timetosample "${outRate}" $(echo "${firstline}" | awk '{print $1}' )) \ + ] + gesZeit=$(bc <<< "((${gesZeit}-1) / 588 + 1)*588") + remixcmd="${remixcmd} trim 0 =${gesZeit}s" + extraIn=" -r ${inRate} -c ${#inputs[@]} -n" +else + extraIn="" +fi if ! ${noGain} then @@ -347,7 +360,7 @@ fi echo sox -M "${inputs[@]}" -p trim ${firstline} echo sox -t sox - -p ${repcmd} echo sox -t sox - -p ${trackmodcmd} -echo sox -t sox - -p ${splicecmd} ${remixcmd} +echo sox -t sox - ${extraIn} -p ${splicecmd} ${remixcmd} echo sox -t sox - ${output} ${trimcmd} if ! ${dummy} @@ -355,6 +368,6 @@ then sox -M "${inputs[@]}" -p trim ${firstline}| \ sox -t sox - -p ${repcmd} | \ sox -t sox - -p ${trackmodcmd} | \ - sox -t sox - -p ${splicecmd} ${remixcmd} | \ + sox -t sox - ${extraIn} -p ${splicecmd} ${remixcmd} | \ sox -t sox - ${output} ${trimcmd} fi |