[asterisk-users] [1.4 + FreeBSD 6.2] Playing WAV PCM file?
dave cantera
david.cantera at iacnet.net
Tue Jan 1 19:34:21 CST 2008
tzafrir,
thanks for the note... yep, it is useless...
daveC
Tzafrir Cohen wrote:
> On Tue, Jan 01, 2008 at 11:27:54AM -0500, dave cantera wrote:
>
>> vincent,
>> here is a script that I used to convert a single wav file or the entire
>> directory... no file specified on launch, converts all files in the current
>> directory...
>> creates a logfile, although trivial...
>> daveC
>>
>> #!/bin/sh
>> #
>> # convert-all.sh
>> #
>> # convert all *.wav files to .gsm .au formats
>> #
>>
>> if [ "null${1}" == "null" ]
>> then
>> FILE_LIST=`ls *.wav`
>> else
>> FILE_LIST=`ls ${1}*.wav`
>> fi
>>
>> LOG="./log_convert.log"
>> echo "======================================================= " >>${LOG}
>> echo " started at `date` " >>${LOG}
>>
>> echo " Removing all current .gsm files..."
>> rm -f *.gsm
>>
>>
>
> # A note from the Useless Use of ls Committee:
>
> for FNAME in $1*.wav
>
>
>> for FNAME in ${FILE_LIST}
>> do
>> echo "---- ------- ----- "
>> echo "---- " >>${LOG}
>> echo " Processing ${FNAME}... "
>> echo " Processing ${FNAME}... " >>${LOG}
>> BASEFNAME=`echo ${FNAME} | awk '{print substr($0,1,length($0)-4)}'`
>>
>> echo " making ${BASEFNAME}.gsm... "
>> echo " making ${BASEFNAME}.gsm... " >>${LOG}
>> #sox -q -V -c 1 ${FNAME} -r 8000 -c 1 -w ${BASEFNAME}.gsm resample -ql
>> 2>>${LOG}
>> sox -q -V ${FNAME} -r 8000 -c 1 ${BASEFNAME}.gsm resample -ql 2>>${LOG}
>> echo "---- " >>${LOG}
>> echo " making ${BASEFNAME}.au... "
>> echo " making ${BASEFNAME}.au... " >>${LOG}
>> sox -q -V ${FNAME} -t au -r 8000 -c 1 -w ${BASEFNAME}.au resample -ql 2>>$
>> {LOG}
>> done
>>
>
>
--
My wife's sister is in California.
I should buy her a Videophone2008!
Truly, The Next Best Thing to Being There!
--
WorldWideVideoPhones.com
856.380.0894
More information about the asterisk-users
mailing list