patch from Peter Ross that fixes typo in README.txt, and makes menu.sh work with...
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 25 Sep 2010 05:52:37 +0000 (05:52 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 25 Sep 2010 05:52:37 +0000 (05:52 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@195 01035d8c-6547-0410-b346-abe4f91aad63

codec2/README.txt
codec2/script/menu.sh

index 7cf3a395ffd8f9658f64381a94860f13f819ec43..cf506c94ddf0b9c7f6b9f034e2fa631b85edea5d 100644 (file)
@@ -13,7 +13,11 @@ $ cd codec2/src
 $ make
 $ ./c2enc ../raw/hts1a.raw hts1a_c2.bit
 $ ./c2dec hts1a_c2.bit hts1a_c2.raw 
-$ ../scripts/menu.sh ../raw/hts1a.raw hts1a_c2.raw
+$ ../script/menu.sh ../raw/hts1a.raw hts1a_c2.raw
+
+For playback testing, menu.sh requires either the 'play', 'aplay' or
+'ossplay' programs to be installed (see http://sox.sourceforge.net/,
+http://www.alsa-project.org/, or http://www.opensound.com/ respectively).
 
 Programs
 --------
index d7305411dc39b61f6e73943f7bed77f91b9819e9..3713522abeda8e0419455e2c31d4777fc845bf20 100755 (executable)
@@ -62,7 +62,15 @@ while true ; do
     if [ $readchar == 'q' -o $readchar == 'Q' ] ; then
       exit 0
     fi
-    play -r 8000 -s -2 ${file[$readchar]} $dsp 2> /dev/null
+    if ( play --version ) >/dev/null 2>&1; then
+      play -r 8000 -s -2 ${file[$readchar]} $dsp 2> /dev/null
+    elif ( aplay --version ) > /dev/null 2>&1; then
+      aplay -r 8000 -f S16_LE ${file[$readchar]} 2> /dev/null
+    elif ( ossplay -f? ) > /dev/null 2>&1; then
+      ossplay -s8000 -fS16_LE ${file[$readchar]} 2> /dev/null
+    else
+      echo "could not find play, aplay or ossplay program"
+    fi
   fi
 done
 echo