Hi<br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 11:18 PM, Johannes H. Jensen <span dir="ltr"><<a href="mailto:joh@pseudoberries.com">joh@pseudoberries.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tue, Aug 9, 2011 at 14:32, Maarten Bosmans <<a href="mailto:mkbosmans@gmail.com">mkbosmans@gmail.com</a>> wrote:<br>
> That could indeed by some handy functionality.<br>
> In pulseaudio there's already a concept of corking a stream. If a<br>
> stream is corked, its audio is muted and the application receives a<br>
> signal so it can pause the playback. If the stream is uncorked, the<br>
> music resumes playing.<br>
<br>
</div>Ah, that's neat! Is there any way to cork a stream from command-line<br>
tools like pacmd?<br></blockquote><div><br>I guess not, but PA does post an event to the application to CORK/UNCORK the stream, its application responsibility to handle the event and behave accordingly. <br>e.g module-cork-music-on-phone , PA posts and event using pa_sink_input_send_event(j, PA_STREAM_EVENT_REQUEST_CORK, NULL)<br>
to the application, application need to register for callback using "pa_stream_set_event_callback" to receive the events from PA.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
> This would indeed be best implemented as a module. You can use<br>
> module-cork-music-on-phone as an example.<br>
> There were also some threads on the mailing list about corking streams<br>
> that you might want to read, such as "dynamic routing through pulse<br>
> audio" a couple of weeks back.<br>
<br>
</div>Great, I will base my module on that :-)<br></blockquote><div><br>Sure, you will get enough hints if you go-through the module-cork-music-on-phone ,so its best to initially modify the existing module-cork-music-on-phone and base your module on this.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Thanks!<br>
<font color="#888888"><br>
- Johannes<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</div></div></blockquote></div><br>