Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArseniyShestakov/eaad55cbdb0a10092dba to your computer and use it in GitHub Desktop.
Save ArseniyShestakov/eaad55cbdb0a10092dba to your computer and use it in GitHub Desktop.
QEMU patch that make audio control easier when you run multiple VMs
diff --git a/audio/paaudio.c b/audio/paaudio.c
index fea6071..5a8a4b9 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -1,6 +1,7 @@
/* public domain */
#include "qemu-common.h"
#include "audio.h"
+#include "sysemu/sysemu.h"
#include <pulse/pulseaudio.h>
@@ -563,7 +564,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as,
pa->stream = qpa_simple_new (
g,
- "qemu",
+ g_strdup_printf("qemu (%s)", qemu_name ? qemu_name : "no-name"),
PA_STREAM_PLAYBACK,
g->conf.sink,
&ss,
@@ -620,7 +621,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque)
pa->stream = qpa_simple_new (
g,
- "qemu",
+ g_strdup_printf("qemu (%s)", qemu_name ? qemu_name : "no-name"),
PA_STREAM_RECORD,
g->conf.source,
&ss,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment