diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-17 01:12:12 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-17 01:12:12 +0100 |
commit | 0ee68146a7cfbabdb1aa20355cb1479fe7277bd0 (patch) | |
tree | 03c101a8b46b7ddd078cb135e3311687fd50c138 /src/main.cpp | |
parent | bf577eec0b025f22195e0a9538e7350a9a7abbe0 (diff) |
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 56687cf..98215be 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1901,11 +1901,7 @@ static void list_system_info(bool wayland) { printf("display_server|%s\n", wayland ? "wayland" : "x11"); bool supports_app_audio = false; #ifdef GSR_APP_AUDIO - gsr_pipewire_audio audio; - if(gsr_pipewire_audio_init(&audio)) { - supports_app_audio = true; - gsr_pipewire_audio_deinit(&audio); - } + supports_app_audio = pulseaudio_server_is_pipewire(); #endif printf("supports_app_audio|%s\n", supports_app_audio ? "yes" : "no"); } @@ -3201,7 +3197,12 @@ int main(int argc, char **argv) { memset(&pipewire_audio, 0, sizeof(pipewire_audio)); if(uses_app_audio) { if(!gsr_pipewire_audio_init(&pipewire_audio)) { - fprintf(stderr, "gsr error: failed to setup PipeWire audio for application audio capture. The likely reason for this failure is that your sound server is not PipeWire\n"); + fprintf(stderr, "gsr error: failed to setup PipeWire audio for application audio capture. The likely reason for this failure is that your sound server is not PipeWire. The options -aa and -aai are only available when running PipeWire audio server.\n"); + _exit(2); + } + + if(!pulseaudio_server_is_pipewire()) { + fprintf(stderr, "gsr error: your sound server is not PipeWire. The options -aa and -aai are only available when running PipeWire audio server.\n"); _exit(2); } |