On Dec 19, 2007 5:10 AM, Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> 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>> That's right... but module-volume-restore remembers the sink for the client<br>> between client connects. So the next time the same client connects,
<br>> module-volume-restore will not assign its streams to the default sink but<br>> one that it has saved.<br>> Basically, I need a module which assigns the default sink to a new<br>> connecting client and passes all its streams to that sink regardless of the
<br>> current default sink (by default pulseaudio uses the default sink for any<br>> new sink-inputs). However, if the client disconnects and connects again, it<br>> should use the new default sink for the streams of the client
<br>> (module-volume-restore preserves the sink for the client between client<br>> connects). The module could be called some thing like<br>> 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'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>