[ogg-dev] Is there an "off" switch to prepare to repeat a call to ogg123?

David Busey davebusey at yahoo.com
Sat Jun 1 21:21:44 PDT 2013




	
	
	
	P { margin-bottom: 0.08in; }A:link {  }


Hi Ogg Fans,



I have a puzzle. When I'm getting ready
to plan a larger program, I often do some little experiments to see
whether what I'm thinking is going to be able to happen in the way
that I anticipate. My next project involves some playing  .ogg  files
in a random order. I have three brief files which I have used in this
experiment. I am currently running openSUSE 12.2       OS:Linux
3.4.42-2.28-desktop x86_64   Current user:ti at linux-iqq6   
System:openSUSE 12.2 (x86_64)     KDE:4.8.5 (4.8.5) "release 2"



When I run this shell program in
Konsole, all three sounds are heard, as expected.



     	#!/bin/bash



     	#                oggtest01    




     	#                shell script to play
three sounds



     	FIRSTSOUND="/home/ti/OGG/OldJoe.ogg"



     	ogg123 FIRSTSOUND



     	SECONDSOUND="/home/ti/OGG/TestCymru-0001.ogg"



     	ogg123 SECONDSOUND



     	FIRSTSOUND="/home/ti/OGG/HowLovely.ogg"
  


     	ogg123 FIRSTSOUND



But in perl, I am confounded. When any
ONE of the system calls is left uncommented, the ONE sound is heard
as expected. In other words, this works OK, playing OldJoe.ogg  :



     	#!/usr/bin/perl -w



     	# system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)



     	system(`ogg123
/home/ti/OGG/OldJoe.ogg`)



     	# system(`ogg123
/home/ti/OGG/HowLovely.ogg`)


And THIS works OK, playing
TestCymru0001.ogg as it should:



     	#!/usr/bin/perl -w



     	system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)



     	# system(`ogg123
/home/ti/OGG/OldJoe.ogg`)



     	# system(`ogg123
/home/ti/OGG/HowLovely.ogg`)



Also, THIS works, playing HowLovely.ogg
as anticipated.



     	#!/usr/bin/perl -w



     	# system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)



     	# system(`ogg123
/home/ti/OGG/OldJoe.ogg`)



     	system(`ogg123
/home/ti/OGG/HowLovely.ogg`)



However, if I alter this microprogram
to try to play even ANY TWO of the sound files (as I did in the very
first shell script above), I get an error message.



     	#!/usr/bin/perl -w



     	# system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)



     	system(`ogg123
/home/ti/OGG/OldJoe.ogg`)



     	system(`ogg123
/home/ti/OGG/HowLovely.ogg`)



+++++++++++++++++++++++++



Pathname> chmod +x
SoundAnOggFile.asc
Pathname> perl
SoundAnOggFile.asc
sytax error at SoundAnOggFile.asc line
7, near ")



system"
Execution of SoundAnOggFile.asc aborted
due to compilation errors



+++++++++++++++++++++++++



 I suspect that the problem is that
something just doesn't "shut down" as I had hoped that it
would after the first call  to ogg123 is made. Do any of you have an
idea how to "turn off" the ogg123 engine to prepare for the
next use of my computer's sound output capability? Of course, my
desire is to turn it off after each instance of the ogg123 call to
prepare for the next one, which will follow in a matter of a few
seconds later.



Thank you for considering this
question.
Dave


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/ogg-dev/attachments/20130601/cc5fab3d/attachment.htm 


More information about the ogg-dev mailing list