aboutsummaryrefslogtreecommitdiffstats
path: root/core/buffer_storage.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-12-12 15:53:53 -0800
committerChris Robinson <[email protected]>2021-12-12 15:53:53 -0800
commit953745d38643b62dd10ba6d8c1e2e4c7fa20eb30 (patch)
tree1b6ced2e22f166513b4c9dbc8b9f53dd46541b98 /core/buffer_storage.h
parent5e3fcb3a934844f1d70aa23a8a871a6915565ed2 (diff)
Make an inline function to check for 2D ambisonic formats
Diffstat (limited to 'core/buffer_storage.h')
-rw-r--r--core/buffer_storage.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/buffer_storage.h b/core/buffer_storage.h
index 091882f9..cde7704e 100644
--- a/core/buffer_storage.h
+++ b/core/buffer_storage.h
@@ -66,6 +66,12 @@ constexpr bool IsUHJ(FmtChannels chans) noexcept
constexpr bool IsAmbisonic(FmtChannels chans) noexcept
{ return IsBFormat(chans) || IsUHJ(chans); }
+constexpr bool Is2DAmbisonic(FmtChannels chans) noexcept
+{
+ return chans == FmtBFormat2D || chans == FmtUHJ2 || chans == FmtUHJ3
+ || chans == FmtSuperStereo;
+}
+
using CallbackType = int(*)(void*, void*, int);