From 3122c3b4a109b7d6e288bdde055fc4bbae5517bc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 17 Feb 2020 17:13:00 -0800 Subject: Handle running the buffer callback in the voice --- al/buffer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'al/buffer.h') diff --git a/al/buffer.h b/al/buffer.h index d1c3c747..61ae1863 100644 --- a/al/buffer.h +++ b/al/buffer.h @@ -61,6 +61,8 @@ enum FmtChannels : unsigned char { ALuint BytesFromFmt(FmtType type) noexcept; ALuint ChannelsFromFmt(FmtChannels chans) noexcept; +inline ALuint FrameSizeFromFmt(FmtChannels chans, FmtType type) noexcept +{ return ChannelsFromFmt(chans) * BytesFromFmt(type); } struct ALbuffer { -- cgit v1.2.3