<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">


        
        
        
        <style type="text/css">P { margin-bottom: 0.08in; }A:link {  }</style>


<p style="margin-bottom: 0in">Hi Ogg Fans,</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">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@linux-iqq6   
System:openSUSE 12.2 (x86_64)     KDE:4.8.5 (4.8.5) "release 2"</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">When I run this shell program in
Konsole, all three sounds are heard, as expected.</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #!/bin/bash</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #                oggtest01    
</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #                shell script to play
three sounds</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        FIRSTSOUND="/home/ti/OGG/OldJoe.ogg"</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        ogg123 FIRSTSOUND</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        SECONDSOUND="/home/ti/OGG/TestCymru-0001.ogg"</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        ogg123 SECONDSOUND</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        FIRSTSOUND="/home/ti/OGG/HowLovely.ogg"</p>
<p style="margin-bottom: 0in">&nbsp; <br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        ogg123 FIRSTSOUND</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">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  :</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #!/usr/bin/perl -w</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        system(`ogg123
/home/ti/OGG/OldJoe.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/HowLovely.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>And THIS works OK, playing
TestCymru0001.ogg as it should:
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp; &nbsp;        #!/usr/bin/perl -w</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/OldJoe.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/HowLovely.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">Also, THIS works, playing HowLovely.ogg
as anticipated.</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #!/usr/bin/perl -w</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/OldJoe.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        system(`ogg123
/home/ti/OGG/HowLovely.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">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.</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        #!/usr/bin/perl -w</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        # system(`ogg123
/home/ti/OGG/TestCymru0001.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        system(`ogg123
/home/ti/OGG/OldJoe.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        system(`ogg123
/home/ti/OGG/HowLovely.ogg`)</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">+++++++++++++++++++++++++</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"><i>Pathname</i>&gt; chmod +x
SoundAnOggFile.asc</p>
<p style="margin-bottom: 0in"><i>Pathname</i>&gt; perl
SoundAnOggFile.asc</p>
<p style="margin-bottom: 0in">sytax error at SoundAnOggFile.asc line
7, near ")</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">system"</p>
<p style="margin-bottom: 0in">Execution of SoundAnOggFile.asc aborted
due to compilation errors</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">+++++++++++++++++++++++++</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in"> 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.</p>
<p style="margin-bottom: 0in"><br>
</p>
<p style="margin-bottom: 0in">Thank you for considering this
question.</p><p style="margin-bottom: 0in"><br></p><p style="margin-bottom: 0in">Dave<br></p>

</td></tr></table>