<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote cite="mid:1249329245.7399.9.camel@mustis" type="cite">
  <pre wrap="">On Sun, 2009-08-02 at 16:45 +0300, David Baron wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">What might be a jack-enabled equivalent of:

/usr/bin/ogg123 -d alsa &lt;1&gt;  (&lt;1&gt; is and ogg file, obviously)

Preferrable would be something that will play through jack if the daemon be 
running, alsa not (mplayer can work this way but this is a bit heavy for a 
short file play, i.e., a signal from a program).
    </pre>
  </blockquote>
  <pre wrap=""><!---->
mplayer fits the bill perfectly imho and I'm not convinced that it's
that heavy - it actually uses very little memory when just playing a
sound file (mp3, ogg, wave). 
  </pre>
</blockquote>
<br>
<br>
Does mplayer auto sense if jack is being used and fall back to
pulse/gstreamer/esd/alsa/oss if not? Maybe David just needs a small
script that willl check the existance of a running jack and trigger the
correct commandline.<br>
<br>
Does anyone have an example of a bash command to check if jack is
running?<br>
<br>
ex. (untested)<br>
<br>
!# /bin/bash<br>
<br>
if(jack_connect 2&gt;&amp;1 | grep "server not running")<br>
<br>
&nbsp;&nbsp;&nbsp; alsaplayer -i text file.ogg<br>
<br>
else<br>
<br>
&nbsp;&nbsp;&nbsp; alsaplayer -i text -o jack file.ogg<br>
<br>
<br>
&nbsp;<br>
<br>
<br>
<br>
<br>
<blockquote cite="mid:1249329245.7399.9.camel@mustis" type="cite">
  <pre wrap="">
If you want a program to have "signal sounds" an external sound player
is bulky regardless of the player used. Jack itself also sounds a bit
overkill. This sounds like the use-case for system sounds, esd, pulse,
etc. 

  </pre>
</blockquote>
<br>
<br>
I agree. Do you want this feature to work so that you can hear the
phone calls when jack is running or do you have a more specific need
for piping the audio through jack?<br>
<br>
IIUC the latest version of pulse will use jack if it is running and
reconfigure itself to use alsa directly when it is not running. This is
the point of the dbus code.<br>
<br>
However I'm not 100% certain that Kjetils suggested method is the
correct way to achieve this. I was under the impression that the latest
version didn't need to be configured at all. The dbus code in jack2
would take care of the call to reconfigure the i/o&nbsp;sinks. I think
Kjetils suggestion means that jack has to be always on before pa is
started.<br>
<br>
<br>
<br>
Cheers<br>
<br>
<br>
Patrick Shirkey<br>
Boost Hardware Ltd
</body>
</html>