You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/audio
Akihiko Odaki 2bccabe6df audio: Reset rate control when adding bytes
Commit 90320051ea ("spiceaudio: add a pcm_ops buffer_get_free
function") caused to emit messages saying "Resetting rate control"
frequently when the guest generates no frames.

audio_rate_peek_bytes() resets the rate control when frames < 0 ||
frames > 65536 where frames is the rate-limited number of frames.
Resetting when frames < 0 is sensible as the number simply doesn't make
sense.

There is a problem when frames > 65536. It implies the guest stopped
generating frames for a while so it makes sense to reset the rate
control when the guest resumed generating frames. However, the
commit mentioned earlier broke this assumption by letting spiceaudio
call audio_rate_peek_bytes() whether the guest is generating frames or
not.

Reset the rate control in audio_rate_add_bytes(), which is called only
when actually adding frames, according to the previous call to
audio_rate_peek_bytes() to avoid frequent rate control resets even when
the guest generates no frame.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20250317-rate-v1-1-da9df062747c@daynix.com>
2 weeks ago
..
alsaaudio.c alsaaudio: Set try-poll to false by default 2 weeks ago
audio-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 4 months ago
audio.c audio: Reset rate control when adding bytes 2 weeks ago
audio.h audio: reintroduce default audio backend for VNC 2 years ago
audio_int.h audio: Reset rate control when adding bytes 2 weeks ago
audio_template.h audio: add float sample endianness converters 2 weeks ago
audio_win_int.c Remove qemu-common.h include from most units 3 years ago
audio_win_int.h
coreaudio.m audio: Drop ifdef for macOS versions older than 12.0 11 months ago
dbusaudio.c dbus: add -audio dbus nsamples option 4 months ago
dsound_template.h dsoundaudio: replace GetForegroundWindow() 4 years ago
dsoundaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
jackaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
meson.build meson: remove unnecessary dependency 1 year ago
mixeng.c audio: add float sample endianness converters 2 weeks ago
mixeng.h audio: add float sample endianness converters 2 weeks ago
mixeng_template.h audio: fix saturation nonlinearity in clip_* functions 5 years ago
noaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
ossaudio.c audio/ossaudio: Fix compiler warning with -Wshadow 2 years ago
paaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
pwaudio.c audio/pw: Report more accurate error when connecting to PipeWire fails 8 months ago
rate_template.h audio: make the resampling code greedy 2 years ago
sdlaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
sndioaudio.c audio: remove QEMU_AUDIO_* and -audio-help support 2 years ago
spiceaudio.c audio: allow returning an error from the driver init 2 years ago
trace-events ui: add more tracing for dbus 11 months ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
wavaudio.c audio: don't abort on f32 audio format in wav backend 2 years ago
wavcapture.c monitor: Use getter/setter functions for cur_mon 5 years ago