besides, how come I get a source and a sink if it is only an output ? Le 26/10/2016 à 18:47, pfl a écrit : > thanks for the infos, I am gonna check this now > > btw do you have any web page where everything is explained ? sources, > sinks, monitors, profiles.... all these > > > Le 26/10/2016 à 18:41, Tanu Kaskinen a écrit : >> On Tue, 2016-10-25 at 19:13 +0200, pfl wrote: >>> hi, >>> >>> I try to set the volume on source #0 (the audio jack of my raspbery pi) >>> but it does not work >> There may be some confusion about the terminology. The audio jack on >> Raspberry Pi is only for output, and "sources" in pulseaudio are for >> recording input. I would guess that you're actually trying to set the >> playback volume, so you're interested in the "sink" volume, not the >> "source" volume. >> >>> void setVolume(int index,int volume) // where index is 0 >>> { >>> pa_operation* o; >>> currentVolume.values[0]=volume; >>> if (!(o = pa_context_set_source_volume_by_index(context, >>> index, >>> ¤tVolume, NULL/*volumeCallback*/, NULL))) >>> { >>> printf("pa_context_set_source_volume_by_index() >>> failed\n"); >> You didn't say this explicitly, but from the mail subject I guess >> pa_context_set_source_volume_by_index() returned NULL. That can happen >> if currentVolume is invalid (you don't show how it's initialized, so I >> don't know if this is the case), or if the connection to the server is >> not yet ready or the connection has terminated. To debug this, you can >> query the connection state with pa_context_get_state(). >> > > > --- > L'absence de virus dans ce courrier électronique a été vérifiée par le > logiciel antivirus Avast. > https://www.avast.com/antivirus > > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus