1
0
mirror of https://gitlab.com/qemu-project/qemu synced 2024-07-09 04:27:12 +00:00

audio: fix GUS audio playback with out.mixing-engine=off

Fix GUS audio playback with out.mixing-engine=off.

The GUS audio device needs to know the amount of samples to
produce in advance.

To reproduce start qemu with
-parallel none -device gus,audiodev=audio0
-audiodev pa,id=audio0,out.mixing-engine=off

and start the cartoon.exe demo in a FreeDOS guest. The demo file
is available on the download page of the GUSemu32 author.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-2-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Volker Rümelin 2022-09-23 20:36:30 +02:00 committed by Gerd Hoffmann
parent 4d31ff32a6
commit 7099a6a220

View File

@ -1139,7 +1139,8 @@ static void audio_run_out (AudioState *s)
}
if (sw->active) {
sw->callback.fn(sw->callback.opaque, INT_MAX);
sw->callback.fn(sw->callback.opaque,
hw_free * sw->info.bytes_per_frame);
}
continue;