I checked the volume in the raspbian volume utility also as I said if I restart my program, it is still the same vollume values, not my values how does it work then ? how to I submit/commit my volume settings ? is there no wiki or anything explaining all these ? Le 27/10/2016 à 16:35, Tanu Kaskinen a écrit : > On Wed, 2016-10-26 at 19:32 +0200, pfl wrote: >> it seems pa_context_set_sink_volume_by_index has no effect >> >> no more error, but the settings are not kept as default > What do you mean by "kept as default"? > >> setOutputVolume(0,100); >> setOutputVolume(1,100); >> setOutputVolume(2,100); >> setOutputVolume(3,100); >> setOutputVolume(4,100); >> >> void setOutputVolume(int index,int volume) >> { >> pa_operation* o; >> >> currentVolume.values[0]=volume; >> currentVolume.values[1]=volume; >> >> if (!(o = pa_context_set_sink_volume_by_index(context, index, >> ¤tVolume, NULL/*volumeCallback*/, NULL))) >> { >> printf("pa_context_set_source_volume_by_index() failed\n"); >> debugContextState(pa_context_get_state(context)); >> return; >> } >> >> printf("new volume [%d]: %d %d\n",index,currentVolume.values[0],currentVolume.values[1]); > When you print this message, do you expect the volume at the server end > to have already changed? All interactions with the server are > asynchronous, so at this point in your code libpulse has only queued > the "set sink volume" command to be sent. The command has not yet > reached the server. > --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus