From 0927d1665738df3b7b33d8e8790d52bd20c63506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Fri, 8 Mar 2019 23:34:24 +0100 Subject: wavaudio: port to -audiodev config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kővágó, Zoltán Message-id: 28c2bf374c447c20937a192695c7b9f5367dea7e.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann --- audio/audio_legacy.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'audio/audio_legacy.c') 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; } -- cgit v1.2.3