Re: [pulseaudio-discuss] [PATCH 09/15] sink, source: Assign to s->muted from only one place

2014-04-16 Thread Alexander E. Patrakov
16.04.2014 14:03, Tanu Kaskinen wrote: For now, would the following documentation be good? /* If the sink mute can change "spontaneously" (i.e. initiated by the sink * implementation, not by someone else calling pa_sink_set_mute()), then * the sink implementation can notify abou

Re: [pulseaudio-discuss] [PATCH 09/15] sink, source: Assign to s->muted from only one place

2014-04-16 Thread Tanu Kaskinen
On Tue, 2014-04-15 at 21:07 +0600, Alexander E. Patrakov wrote: > 15.04.2014 16:56, Tanu Kaskinen wrote: > > +typedef int (*pa_sink_get_mute_cb_t)(pa_sink *s, bool *mute); > > + > > struct pa_sink { > > pa_msgobject parent; > > > > @@ -191,14 +193,14 @@ struct pa_sink { > >* set

Re: [pulseaudio-discuss] [PATCH 09/15] sink, source: Assign to s->muted from only one place

2014-04-15 Thread Alexander E. Patrakov
15.04.2014 16:56, Tanu Kaskinen wrote: +typedef int (*pa_sink_get_mute_cb_t)(pa_sink *s, bool *mute); + struct pa_sink { pa_msgobject parent; @@ -191,14 +193,14 @@ struct pa_sink { * set this callback. */ pa_sink_cb_t write_volume; /* may be NULL */ -/* Called when

[pulseaudio-discuss] [PATCH 09/15] sink, source: Assign to s->muted from only one place

2014-04-15 Thread Tanu Kaskinen
Forcing all mute changes to go through set_mute() makes it easier to check where the muted field is changed, and it also allows us to have only one place where notifications for changed mute are sent. --- src/modules/alsa/alsa-sink.c | 17 ++--- src/modules/alsa/alsa-source.c | 17 ++