qemu-e2k/hw/audio
Mark Cave-Ayland 5243e5543e asc: generate silence if FIFO empty but engine still running
MacOS (un)helpfully leaves the FIFO engine running even when all the samples have
been written to the hardware, and expects the FIFO status flags and IRQ to be
updated continuously.

There is an additional problem in that not all audio backends guarantee an
all-zero output when there is no FIFO data available, in particular the Windows
dsound backend which re-uses its internal circular buffer causing the last played
sound to loop indefinitely.

Whilst this is effectively a bug in the Windows dsound backend, work around it
for now using a simple heuristic: if the FIFO remains empty for half a cycle
(~23ms) then continuously fill the generated buffer with empty silence.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-9-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2023-10-06 10:33:43 +02:00
..
ac97.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
ac97.h hw/audio/ac97: Split off some definitions to a header 2023-02-27 22:29:02 +01:00
adlib.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
asc.c asc: generate silence if FIFO empty but engine still running 2023-10-06 10:33:43 +02:00
cs4231.c hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
cs4231a.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
es1370.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
fmopl.c audio: spelling fixes 2023-09-08 13:08:52 +03:00
fmopl.h audio: spelling fixes 2023-09-08 13:08:52 +03:00
gus.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
gusemu_hal.c audio: spelling fixes 2023-09-08 13:08:52 +03:00
gusemu_mixer.c
gusemu.h
gustate.h
hda-codec-common.h
hda-codec.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
intel-hda-defs.h audio: spelling fixes 2023-09-08 13:08:52 +03:00
intel-hda.c hw/audio: Simplify hda audio init 2023-09-22 16:30:07 +02:00
intel-hda.h hw/audio: Simplify hda audio init 2023-09-22 16:30:07 +02:00
Kconfig audio: add Apple Sound Chip (ASC) emulation 2023-10-06 10:33:43 +02:00
lm4549.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
lm4549.h hw/audio/lm4549: Add errp error reporting to init function 2023-09-22 16:30:07 +02:00
marvell_88w8618.c
meson.build audio: add Apple Sound Chip (ASC) emulation 2023-10-06 10:33:43 +02:00
pcspk.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
pl041.c hw/audio/lm4549: Add errp error reporting to init function 2023-09-22 16:30:07 +02:00
pl041.h
pl041.hx
sb16.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
soundhw.c introduce -audio as a replacement for -soundhw 2022-05-14 12:33:44 +02:00
trace-events audio: add Apple Sound Chip (ASC) emulation 2023-10-06 10:33:43 +02:00
trace.h
via-ac97.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
wm8750.c audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00