[pulseaudio-discuss] pa_context_set_source_volume_by_index() failed
pfl
pfl at messofts.be
Sun Oct 30 08:35:05 UTC 2016
I tried adding root to the pulse-access group but still does not connect
I installed a new version of raspbian, just in case, but same problem
Le 29/10/2016 à 12:50, pfl a écrit :
> I realised I could not connect to the server running my program as
> root (sudo)
>
> PA_CONTEXT_CONNECTING
> (and stops there, pa_context_connect does not return at all)
>
> is there any user permission involved with pulse audio ?
>
>
>
> Le 28/10/2016 à 21:02, Tanu Kaskinen a écrit :
>> On Fri, 2016-10-28 at 19:58 +0200, pfl wrote:
>>> I tried to implement it but I cant connect anymore
>>>
>>> "context_state_callback" is called only once with the state
>>> PA_CONTEXT_CONNECTING and is never called back
>>>
>>> I tried using pa_threaded_mainloop_lock(mainloop); and
>>> pa_threaded_mainloop_unlock(mainloop); around my waiting loop but it
>>> does not work either
>>>
>>> Audio::Audio()
>>> {
>>> mainloop=pa_threaded_mainloop_new();
>>> api = pa_threaded_mainloop_get_api(mainloop);
>>>
>>> pa_proplist *proplist = pa_proplist_new();
>>> pa_proplist_sets(proplist, PA_PROP_APPLICATION_NAME, "PulseAudio
>>> Volume Control");
>>> pa_proplist_sets(proplist, PA_PROP_APPLICATION_ID,
>>> "org.PulseAudio.pavucontrol");
>>> pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME,
>>> "audio-card");
>>> pa_proplist_sets(proplist, PA_PROP_APPLICATION_VERSION, "1.0");
>>>
>>> context = pa_context_new_with_proplist(api, NULL, proplist);
>>> pa_proplist_free(proplist);
>>>
>>> pa_context_set_state_callback(context, context_state_callback,
>>> NULL);
>>>
>>> pa_context_connect(context, NULL, PA_CONTEXT_NOFAIL, NULL);
>>>
>>> pa_threaded_mainloop_start(mainloop);
>>>
>>> do
>>> {
>>> }
>>> while(toTreat!=0);
>>>
>>> }
>> This code looks like it should work. Does pa_context_connect() return
>> an error? What if you don't use PA_CONTEXT_NOFAIL?
>>
>
>
> ---
> 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
More information about the pulseaudio-discuss
mailing list