Browse Source

pipewire: Use a more specific stream name than "Audio Stream".

This info shows up in `pw-top` ...Gnome's sound preferences (etc) would
already show something more app-specific, but this command line tool shows
specific stream names.
Ryan C. Gordon 3 months ago
parent
commit
a9bee3c0bf
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/audio/pipewire/SDL_pipewire.c

+ 7 - 1
src/audio/pipewire/SDL_pipewire.c

@@ -1114,7 +1114,13 @@ static bool PIPEWIRE_OpenDevice(SDL_AudioDevice *device)
 
     stream_name = SDL_GetHint(SDL_HINT_AUDIO_DEVICE_STREAM_NAME);
     if (!stream_name || *stream_name == '\0') {
-        stream_name = "Audio Stream";
+        if (app_name) {
+            stream_name = app_name;
+        } else if (app_id) {
+            stream_name = app_id;
+        } else {
+            stream_name = "SDL Audio Stream";
+        }
     }
 
     /*