From: <kr...@us...> - 2008-01-11 17:38:55
|
Revision: 1510 http://astlinux.svn.sourceforge.net/astlinux/?rev=1510&view=rev Author: krisk84 Date: 2008-01-11 09:38:44 -0800 (Fri, 11 Jan 2008) Log Message: ----------- first run at sndvol support - not done yet Modified Paths: -------------- trunk/package/asterisk/Config.in trunk/package/asterisk/asterisk.mk Added Paths: ----------- trunk/toolchain/sndvol Modified: trunk/package/asterisk/Config.in =================================================================== --- trunk/package/asterisk/Config.in 2008-01-11 04:45:09 UTC (rev 1509) +++ trunk/package/asterisk/Config.in 2008-01-11 17:38:44 UTC (rev 1510) @@ -57,3 +57,23 @@ depends BR2_PACKAGE_ASTERISK help Run interactive menuselect to select custom Asterisk options + +config BR2_PACKAGE_ASTERISK_SNDVOL + bool "Asterisk MOH sound volume" + default n + depends BR2_PACKAGE_ASTERISK + help + Some people think the volume of the music on hold files included + with Asterisk is too high. This will let you change it before + the files get copied into your image. You will need to have sox + installed on your build machine. + + Thanks to Lonnie Abelbeck for the tip and sox command line + +config BR2_PACKAGE_ASTERISK_SNDVOL_LEVEL + string "The actual volume adjustment" + default 0.3 + depends BR2_PACKAGE_ASTERISK_SNDVOL + help + The actual volume adjustment passed to sox (-v). See the sox man + page for more help. Modified: trunk/package/asterisk/asterisk.mk =================================================================== --- trunk/package/asterisk/asterisk.mk 2008-01-11 04:45:09 UTC (rev 1509) +++ trunk/package/asterisk/asterisk.mk 2008-01-11 17:38:44 UTC (rev 1510) @@ -154,6 +154,12 @@ cp -f package/asterisk/custom/*.conf $(TARGET_DIR)/stat/etc/asterisk/ endif +$(TARGET_DIR)/stat/var/lib/asterisk/moh-sndvol: + toolchain/sndvol $(BR2_PACKAGE_ASTERISK_SNDVOL_LEVEL) $(TARGET_DIR)/stat/var/lib/asterisk/moh \ + $(TARGET_DIR)/stat/var/lib/asterisk/moh-sndvol + +sndvol: $(TARGET_DIR)/stat/var/lib/asterisk/moh-sndvol + asterisk: uclibc libelf ncurses zlib openssl libtool $(ASTERISK_EXTRAS) $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY) asterisk-source: $(DL_DIR)/$(ASTERISK_SOURCE) @@ -199,3 +205,6 @@ TARGETS+=asterisk endif +ifeq ($(strip $(BR2_PACKAGE_ASTERISK_SNDVOL)),y) +TARGETS+=sndvol +endif Added: trunk/toolchain/sndvol =================================================================== --- trunk/toolchain/sndvol (rev 0) +++ trunk/toolchain/sndvol 2008-01-11 17:38:44 UTC (rev 1510) @@ -0,0 +1,37 @@ +#!/bin/bash +FORMATS=".wav .ulaw" + + +if [ ! $2 ] +then +echo "Usage: + +$0 [volume] [indir] [outdir]" +exit 1 +fi + +if `which sox > /dev/null 2> /dev/null` +then +SOX=`which sox` +else +echo "You need to have sox installed" +exit 1 +fi + +INDIR=$2 +OUTDIR=$3 +VOLUME=$1 + +if [ ! -d $OUTDIR ] +then +mkdir -p $OUTDIR +fi + +for i in $FORMATS +do +for i in `ls $1/*.$FORMATS` +do +OUTFILE=`basename $i` +sox -v $VOLUME $i "$OUTDIR"/"$OUTFILE" +done +done Property changes on: trunk/toolchain/sndvol ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |