aboutsummaryrefslogtreecommitdiffstats
path: root/al/buffer.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-02-17 17:13:00 -0800
committerChris Robinson <[email protected]>2020-02-17 17:13:25 -0800
commit3122c3b4a109b7d6e288bdde055fc4bbae5517bc (patch)
treeb2eb3a251a243d3a5f9a7566c343bc614c9ff8cc /al/buffer.h
parentc8dfd248185359d86410340741122943524ed10b (diff)
Handle running the buffer callback in the voice
Diffstat (limited to 'al/buffer.h')
-rw-r--r--al/buffer.h2
1 files changed, 2 insertions, 0 deletions
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 {