diff options
author | Kővágó, Zoltán <dirty.ice.hu@gmail.com> | 2019-03-08 23:34:24 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-11 10:29:27 +0100 |
commit | 0927d1665738df3b7b33d8e8790d52bd20c63506 (patch) | |
tree | fb8cddd32cfd6859e64ebddd2ffef1582f4dbe6e /audio/audio_legacy.c | |
parent | 8af2234f7fbc7c32fb199dac351c3171efa34d10 (diff) |
wavaudio: port to -audiodev config
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Message-id: 28c2bf374c447c20937a192695c7b9f5367dea7e.1552083282.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio_legacy.c')
-rw-r--r-- | audio/audio_legacy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/audio/audio_legacy.c b/audio/audio_legacy.c index 478cf76d5f..6d140119d9 100644 --- a/audio/audio_legacy.c +++ b/audio/audio_legacy.c @@ -289,6 +289,18 @@ static void handle_sdl(Audiodev *dev) &dev->u.sdl.out->has_buffer_length, dev->u.sdl.out); } +/* wav */ +static void handle_wav(Audiodev *dev) +{ + get_int("QEMU_WAV_FREQUENCY", + &dev->u.wav.out->frequency, &dev->u.wav.out->has_frequency); + get_fmt("QEMU_WAV_FORMAT", &dev->u.wav.out->format, + &dev->u.wav.out->has_format); + get_int("QEMU_WAV_DAC_FIXED_CHANNELS", + &dev->u.wav.out->channels, &dev->u.wav.out->has_channels); + get_str("QEMU_WAV_PATH", &dev->u.wav.path, &dev->u.wav.has_path); +} + /* general */ static void handle_per_direction( AudiodevPerDirectionOptions *pdo, const char *prefix) @@ -354,6 +366,10 @@ static AudiodevListEntry *legacy_opt(const char *drvname) handle_sdl(e->dev); break; + case AUDIODEV_DRIVER_WAV: + handle_wav(e->dev); + break; + default: break; } |