[pulseaudio-discuss] Automatic muting of multiple applications
Himanshu Chug
himanshu.chug at gmail.com
Wed Aug 10 05:13:24 PDT 2011
Hi
On Tue, Aug 9, 2011 at 11:18 PM, Johannes H. Jensen
<joh at pseudoberries.com>wrote:
> On Tue, Aug 9, 2011 at 14:32, Maarten Bosmans <mkbosmans at gmail.com> wrote:
> > That could indeed by some handy functionality.
> > In pulseaudio there's already a concept of corking a stream. If a
> > stream is corked, its audio is muted and the application receives a
> > signal so it can pause the playback. If the stream is uncorked, the
> > music resumes playing.
>
> Ah, that's neat! Is there any way to cork a stream from command-line
> tools like pacmd?
>
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.
e.g module-cork-music-on-phone , PA posts and event using
pa_sink_input_send_event(j, PA_STREAM_EVENT_REQUEST_CORK, NULL)
to the application, application need to register for callback using
"pa_stream_set_event_callback" to receive the events from PA.
>
> > This would indeed be best implemented as a module. You can use
> > module-cork-music-on-phone as an example.
> > There were also some threads on the mailing list about corking streams
> > that you might want to read, such as "dynamic routing through pulse
> > audio" a couple of weeks back.
>
> Great, I will base my module on that :-)
>
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.
>
> Thanks!
>
> - Johannes
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110810/cf0e3a5a/attachment.html>
More information about the pulseaudio-discuss
mailing list