From 901804d724d49f316cd2bf51ec1cd2cd9fb9eb91 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 12 Apr 2017 18:26:07 -0700 Subject: Store the ambisonic order separate from the channel enum --- OpenAL32/Include/alMain.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 1919a257..fc2c5e8f 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -508,24 +508,20 @@ enum DevFmtChannels { DevFmtX51 = ALC_5POINT1_SOFT, DevFmtX61 = ALC_6POINT1_SOFT, DevFmtX71 = ALC_7POINT1_SOFT, + DevFmtAmbi3D = ALC_BFORMAT3D_SOFT, /* Similar to 5.1, except using rear channels instead of sides */ DevFmtX51Rear = 0x80000000, - /* Ambisonic formats should be kept together */ - DevFmtAmbi1, - DevFmtAmbi2, - DevFmtAmbi3, - DevFmtChannelsDefault = DevFmtStereo }; #define MAX_OUTPUT_CHANNELS (16) ALsizei BytesFromDevFmt(enum DevFmtType type); -ALsizei ChannelsFromDevFmt(enum DevFmtChannels chans); -inline ALsizei FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) +ALsizei ChannelsFromDevFmt(enum DevFmtChannels chans, ALsizei ambiorder); +inline ALsizei FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type, ALsizei ambiorder) { - return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type); + return ChannelsFromDevFmt(chans, ambiorder) * BytesFromDevFmt(type); } enum AmbiLayout { @@ -668,6 +664,7 @@ struct ALCdevice_struct enum DevFmtChannels FmtChans; enum DevFmtType FmtType; ALboolean IsHeadphones; + ALsizei AmbiOrder; /* For DevFmtAmbi* output only, specifies the channel order and * normalization. */ -- cgit v1.2.3