mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
tests/sync-playback: check if pa_context_connect succeed
This commit is contained in:
parent
93ed27d561
commit
a836927495
1 changed files with 6 additions and 1 deletions
|
|
@ -174,11 +174,16 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
pa_context_set_state_callback(context, context_state_callback, NULL);
|
||||
|
||||
pa_context_connect(context, NULL, 0, NULL);
|
||||
/* Connect the context */
|
||||
if (pa_context_connect(context, NULL, 0, NULL) < 0) {
|
||||
fprintf(stderr, "pa_context_connect() failed.\n");
|
||||
goto quit;
|
||||
}
|
||||
|
||||
if (pa_mainloop_run(m, &ret) < 0)
|
||||
fprintf(stderr, "pa_mainloop_run() failed.\n");
|
||||
|
||||
quit:
|
||||
pa_context_unref(context);
|
||||
|
||||
for (i = 0; i < NSTREAMS; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue