From 902f5a0dd267e0849e93e863a24a0a350d1696f9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 3 Apr 2020 21:43:57 -0700 Subject: Add an ambisonic order parameter to the buffer channel count --- al/buffer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'al/buffer.h') diff --git a/al/buffer.h b/al/buffer.h index 15367a63..44ada667 100644 --- a/al/buffer.h +++ b/al/buffer.h @@ -58,9 +58,9 @@ 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); } +ALuint ChannelsFromFmt(FmtChannels chans, ALuint ambiorder) noexcept; +inline ALuint FrameSizeFromFmt(FmtChannels chans, FmtType type, ALuint ambiorder) noexcept +{ return ChannelsFromFmt(chans, ambiorder) * BytesFromFmt(type); } struct ALbuffer { @@ -100,7 +100,7 @@ struct ALbuffer { ALuint id{0}; inline ALuint bytesFromFmt() const noexcept { return BytesFromFmt(mFmtType); } - inline ALuint channelsFromFmt() const noexcept { return ChannelsFromFmt(mFmtChannels); } + inline ALuint channelsFromFmt() const noexcept { return ChannelsFromFmt(mFmtChannels, 1); } inline ALuint frameSizeFromFmt() const noexcept { return channelsFromFmt() * bytesFromFmt(); } DISABLE_ALLOC() -- cgit v1.2.3