Update of /cvsroot/audacity/audacity-src/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31091/scripts
Modified Files: pipe-test.pl Log Message: Update the mod-script-pipe test script to get responses again Index: pipe-test.pl =================================================================== RCS file: /cvsroot/audacity/audacity-src/scripts/pipe-test.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pipe-test.pl 3 Jun 2009 05:26:30 -0000 1.2 +++ pipe-test.pl 7 Jun 2009 15:32:22 -0000 1.3 @@ -32,7 +32,7 @@ sub finish{ close TO_SRV; close FROM_SRV; - print "\nDone\n"; + print "Done\n"; } sub doCommand{ @@ -45,29 +45,36 @@ } print "Sent: $command\n"; -# Responses are disabled for now. +# while(my $ttt = <FROM_SRV>) { +# $ttt = chomp($ttt) +# print "Recd:$ttt\n"; +# last if ($ttt =~ /^$/); +# } -# my $ttt = <FROM_SRV>; + my $ttt = <FROM_SRV>; + chomp($ttt); # if( $ttt =~ /^Lines:(\d+)$/ ) -# { -## This block of code deals with multi-line responses. -## When there is more than one line of repsonse, -## Audacity starts out by stating how many lines there -## will be. -# $nLines = $1; -## print "Number of lines is $nLines"; -# print "Recd:$ttt"; -# for($i=0;$i<$nLines;$i++) -# { -# $ttt = <FROM_SRV>; -# print "Recd:$i:$ttt"; -# } -# } -# else -# { -# print "Recd:$ttt"; -# } -# return $ttt; + if( $ttt =~ /Lines:(\d+)/ ) + { +# This block of code deals with multi-line responses. +# When there is more than one line of repsonse, +# Audacity starts out by stating how many lines there +# will be. + $nLines = $1; + print "Number of lines is $nLines\n"; + print "Recd: $ttt\n"; + for($i=0;$i<$nLines;$i++) + { + $ttt = <FROM_SRV>; + chomp($ttt); + print "Recd: $i:$ttt\n"; + } + } + else + { + print "Recd: $ttt\n"; + } + return $ttt; } # Send some test commands - commands currently allowed are precisely those @@ -76,13 +83,14 @@ startUp(); sleep(1); doCommand( 'Amplify: Ratio=0.1' ); -sleep(2); +sleep(0.2); doCommand( 'Echo: Delay=1.0 Decay=0.5' ); -sleep(2); +sleep(0.2); doCommand( 'Amplify: Ratio=2.0' ); -sleep(2); +sleep(0.2); doCommand( 'Echo: Delay=1.0 Decay=0.5' ); -sleep(2); +sleep(0.2); doCommand( 'ExportMp3' ); -sleep(2); +sleep(0.2); +doCommand( '<Not a valid command>'); finish(); ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs