--- burncdda-1.8.2.old/decodenorm.func +++ burncdda-1.8.2/decodenorm.func @@ -159,19 +159,24 @@ echo -e "${GREEN} OK${NOCOLOR}" else echo "mplayer..." + LLNWAV="$IMGDIR/$WAVNAME/$WAVNAME.$LL$N.wav" + TMPWAV="$IMGDIR/$WAVNAME/soxtemp$$.wav" + $NICE -n $NICELEVEL $MPLAYER -really-quiet -noconsolecontrols -vc null -vo null \ - -ao pcm:waveheader:fast:file="$IMGDIR/$WAVNAME/$WAVNAME.$LL$N.wav" \ + -ao pcm:waveheader:fast:file="$LLNWAV" \ -af resample=44100:0:2,channels=2 "$LINE" 1> /dev/null 2> /dev/null - if [ ! -r "$IMGDIR/$WAVNAME/$WAVNAME.$LL$N.wav" ]; then + if [ ! -r "$LLNWAV" ]; then decerror fi - echo "--> $WAVNAME.$LL$N.wav" + echo "--> $LLNWAV" if [ $NORMSET = 1 ]; then echo "normalize..." - $NICE -n $NICELEVEL $NORMALIZE -q --amplitude=$NORMAMP "$IMGDIR/$WAVNAME/$WAVNAME.$LL$N.wav" || decerror - echo "--> $WAVNAME.$LL$N.wav was normalized to $NORMAMP" +$NICE -n $NICELEVEL $NORMALIZE -q --amplitude=$NORMAMP "$LLNWAV" || decerror +echo "--> $LLNWAV normalized to $NORMAMP" fi - timecount "$IMGDIR/$WAVNAME/$WAVNAME.$LL$N.wav" + sox "$LLNWAV" -t cdda "$TMPWAV" + mv "$TMPWAV" "$LLNWAV" + timecount "$LLNWAV" echo -e "${GREEN} OK${NOCOLOR}" fi else