#!/bin/csh
# [gfc] NormResample
# Batch process a 48K DAT file,
# First normalize the channel levels, then resample to 44.1K
# The funny mv lines correctly deal with moving the normalized files
# over the original one, they takes care of the case where one channel
# needs normalizing and the other one doesn't, i.e. tmp1 or tmp2 don't
# get created.
#

rm tmp2.wav tmp1.wav >& /dev/null
Stereonorm $1
mv tmp2.wav tmp1.wav >& /dev/null
mv tmp1.wav $1 >& /dev/null
Resample $1
mv $1.44k.wav $1

exit
