On Dec 19, 2007 5:10 AM, Lennart Poettering &lt;<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, 18.12.07 16:11, Ritesh Kumar (<a href="mailto:ritesh@cs.unc.edu">ritesh@cs.unc.edu</a>) wrote:<br><br>&gt; That&#39;s right... but module-volume-restore remembers the sink for the client<br>&gt; between client connects. So the next time the same client connects,
<br>&gt; module-volume-restore will not assign its streams to the default sink but<br>&gt; one that it has saved.<br>&gt; Basically, I need a module which assigns the default sink to a new<br>&gt; connecting client and passes all its streams to that sink regardless of the
<br>&gt; current default sink (by default pulseaudio uses the default sink for any<br>&gt; new sink-inputs). However, if the client disconnects and connects again, it<br>&gt; should use the new default sink for the streams of the client
<br>&gt; (module-volume-restore preserves the sink for the client between client<br>&gt; connects). The module could be called some thing like<br>&gt; module-preserve-client-sink or something.<br><br></div>The problem is that currently not a single client I know is able to
<br>reuse its connection. I.e. each time a new stream is created it is<br>created inside a new connection.<br></blockquote><div><br>Oh... I see the problem in my previous logic now... the media player reconnects as a *different* client (and a different sink-input). I was wondering, is this because of the alsa API not having a client/sink-input abstraction (and my usage for alsa-pulse for playback)? I took a brief look at the alsa PCM API at 
<a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a> ... and it does seem to be the case from whatever I could tell.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>And thus I fear what you want to do is practically not implementable,<br>unless you resort to evil hacks like basing your decision on timeouts.<br><div><div><br></div><div class="Wj3C7c"></div></div></blockquote></div>
<br>Hmmm... that&#39;s too bad. Do you think directly supporting the pulse API in the application will do the trick (along with the module I described previously)?<br><br>Ritesh<br><br>