[pulseaudio-discuss] Automatic muting of multiple applications
himanshu.chug at gmail.com
Wed Aug 10 05:13:24 PDT 2011
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
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.
> - Johannes
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pulseaudio-discuss