[pulseaudio-discuss] cannot set volume in c++
pfl
pfl at messofts.be
Sun Jun 5 08:16:29 UTC 2016
hello everyone,
for a raspberrry applicance I need to setup the input volume of the
microphone programaticaly
in c++, I can read the actual value (changed if I change it in the pa
mixer), but as I set it, it does not seem to work...
after I launched my code, I check in the pa panel mixer, the volume is
not changed
below, the sources with their chanels and volumes
|SOURCE
:[0]'alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo.monitor''Monitor
of Audio Adapter Analog Stereo'(0)=65536(1)=65536SOURCE
:[1]'alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono''Audio
Adapter Analog Mono'(0)=26281SOURCE
:[2]'alsa_output.0.analog-stereo.monitor''Monitor of bcm2835 ALSA Analog
Stereo'(0)=65536(1)=65536|
so I try to change volume of source index #1
|voidsetVolume(intindex,intvolume){pa_operation*o;currentVolume.values[0]=volume;if(!(o
=pa_context_set_source_output_volume(context,index,¤tVolume,NULL,NULL))){printf("pa_context_set_source_output_volume()
failed");return;}printf("new volume:
%d\n",currentVolume.values[0]);pa_operation_unref(o);}|
please can someone help ?
thanks
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160605/5e4e9f05/attachment.html>
More information about the pulseaudio-discuss
mailing list