diff options
author | Volker RĂ¼melin <vr_qemu@t-online.de> | 2021-05-17 21:46:03 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-17 11:54:09 +0200 |
commit | 37a54d054f5aac43cb5721c68954b8b76d0db12d (patch) | |
tree | 891a4c1664a5e9e8867008e657d19ccec246afea /audio/audio.c | |
parent | 50db82d84ce24e893932ecb1aa90cc9c5560fc91 (diff) |
audio: move code to audio/audio.c
Move the code to generate the pa_context_new() application name
argument to a function in audio/audio.c. The new function
audio_application_name() will also be used in the jackaudio
backend.
Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de>
Message-Id: <20210517194604.2545-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio.c')
-rw-r--r-- | audio/audio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/audio/audio.c b/audio/audio.c index 534278edfe..052ca6cb78 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -32,6 +32,7 @@ #include "qapi/qapi-visit-audio.h" #include "qemu/cutils.h" #include "qemu/module.h" +#include "qemu-common.h" #include "sysemu/replay.h" #include "sysemu/runstate.h" #include "ui/qemu-spice.h" @@ -2172,6 +2173,14 @@ const char *audio_get_id(QEMUSoundCard *card) } } +const char *audio_application_name(void) +{ + const char *vm_name; + + vm_name = qemu_get_vm_name(); + return vm_name ? vm_name : "qemu"; +} + void audio_rate_start(RateCtl *rate) { memset(rate, 0, sizeof(RateCtl)); |