summaryrefslogtreecommitdiff
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index a4d4e3ea4..353f8b8d2 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -315,7 +315,7 @@ static int flushAudioBuffer(void)
static size_t audio_buffer_size(const struct audio_format *af)
{
- return (af->bits >> 3) * af->channels * (af->sample_rate >> 5);
+ return audio_format_frame_size(af) * (af->sample_rate >> 5);
}
static void audio_buffer_resize(size_t size)