aboutsummaryrefslogtreecommitdiff
path: root/audio/audio_int.h
diff options
context:
space:
mode:
authorVolker Rümelin <vr_qemu@t-online.de>2022-09-23 20:36:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2022-10-11 10:17:08 +0200
commit02732641c0ffdedb6533b9ddeaf8e95a3be88ec6 (patch)
tree14db437f5a082688e4bf77f6699ef56953fe2172 /audio/audio_int.h
parent5a9d7ae25175d19f9380128ac17f87816fe6f049 (diff)
downloadqemu-02732641c0ffdedb6533b9ddeaf8e95a3be88ec6.zip
qemu-02732641c0ffdedb6533b9ddeaf8e95a3be88ec6.tar.gz
qemu-02732641c0ffdedb6533b9ddeaf8e95a3be88ec6.tar.bz2
audio: add more audio rate control functions
The next patch needs two new rate control functions. The first one returns the bytes needed at call time to maintain the selected rate. The second one adjusts the bytes actually sent. Split the audio_rate_get_bytes() function into these two functions and reintroduce audio_rate_get_bytes(). Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220923183640.8314-5-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio_int.h')
-rw-r--r--audio/audio_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 2a6914d..97e20e8 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -263,6 +263,8 @@ typedef struct RateCtl {
} RateCtl;
void audio_rate_start(RateCtl *rate);
+size_t audio_rate_peek_bytes(RateCtl *rate, struct audio_pcm_info *info);
+void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used);
size_t audio_rate_get_bytes(struct audio_pcm_info *info, RateCtl *rate,
size_t bytes_avail);