Hi Gian,
For muting you could use
pa_context_set_sink_mute_by_index ?
To control volume, you need to set the volume on a pa_cvolume and then set
the volume on the device with this struct. something like
one sink_info* s (passed in)
pa_volume_t new_volume = pa_sw_volume_from_linear(linear_input);
pa_cvolume dev_vol;
pa_cvolume_set(&dev_vol, s->volume.channels, new_volume);
pa_operation_unref(pa_context_set_sink_volume_by_index(pulse_context,
s->index, &dev_vol, NULL, NULL));
The docs on the wiki are pretty comprehensive about this.
Conor
On Tue, Feb 9, 2010 at 9:39 AM, Gian Lorenzo Meocci <[email protected]>wrote:
> Hi all,
>
>
> I have soume problem to control audio volume.
> I am using:
>
> pa_cvolume a;
> a.channels = channels;
> a.values[0] = PA_VOLUME_MUTED;
> a.values[1] = PA_VOLUME_MUTED;
>
> if(pa_cvolume_valid(&a))
> qDebug() << "VALID";
> pa_cvolume_mute(&a, channels);
>
>
> but volume remain set NORMAL why???
>
>
> --
> Ing. Gian Lorenzo Meocci
> http://www.meocci.it
> _______________________________________________
> pulseaudio-discuss mailing list
> [email protected]
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss