Defined in carb/audio/AudioUtils.h

constexpr SpeakerMode carb::audio::getSpeakerFlagsForCount(size_t channels)

calculates a set of speaker flags for a channel count.


channels[in] the number of channels to calculate the speaker flags for. This should be less than or equal to kMaxChannels.


a set of speaker flags as a SpeakerMode value representing the number of channels that was requested. Note that this will not necessarily be a standard speaker mode layout for the given channel count. This should only be used in cases where getSpeakerModeForCount() returns kSpeakerModeDefault and a speaker mode value other than kSpeakerModeDefault is strictly needed.