[pulseaudio-discuss] pa_simple_new function - Failed to load cookie file from cookie: Not a directory

Björn Försterling bjoern.foersterling at web.de
Wed Aug 16 15:08:25 UTC 2023


Hello everyone,

I am using the pulse audio simple API in a C program and I am getting the
following error message when using the "pa_simple_new" function:

28	    simple = pa_simple_new(NULL, "Audio Playback", PA_STREAM_PLAYBACK,
NULL, "playback", &ss, NULL, NULL, &pa_error);
(gdb) 
[New Thread 0x7ffff34416c0 (LWP 3517)]
Failed to load cookie file from cookie: Not a directory

The audio file that I am playing in the later part of the program is still being
played correctly.
But how do I suppress (or solve) this error message?

I tried setting the environment variable PULSE_COOKIE like this:
export PULSE_COOKIE="~/.config/pulse/cookie"
But it did not help. (this "cookie" file exists)

The return value of the pa_simple_new function is not NULL:
(gdb) p simple
$1 = (pa_simple *) 0x5555555592d0

And the pa_error integer that I am trying to get an error code with stays at 0.

Can someone please help me to debug this issue?

Thank you and regards
Björn


More information about the pulseaudio-discuss mailing list