[pulseaudio-discuss] voulme control

Gian Lorenzo Meocci glmeocci at gmail.com
Tue Feb 9 10:55:09 PST 2010


Hi,

> 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));

I am using simple api. This is a problem?
Because I don't have a pulse_context.

Sorry but I am new about pulseaudio :)
thanks a lot

-- 
GL



More information about the pulseaudio-discuss mailing list