8 #define SPEAKER_FRONT_LEFT 0x1 9 #define SPEAKER_FRONT_RIGHT 0x2 10 #define SPEAKER_FRONT_CENTER 0x4 11 #define SPEAKER_LOW_FREQUENCY 0x8 12 #define SPEAKER_BACK_LEFT 0x10 13 #define SPEAKER_BACK_RIGHT 0x20 14 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 15 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 16 #define SPEAKER_BACK_CENTER 0x100 17 #define SPEAKER_SIDE_LEFT 0x200 18 #define SPEAKER_SIDE_RIGHT 0x400 19 #define SPEAKER_TOP_CENTER 0x800 20 #define SPEAKER_TOP_FRONT_LEFT 0x1000 21 #define SPEAKER_TOP_FRONT_CENTER 0x2000 22 #define SPEAKER_TOP_FRONT_RIGHT 0x4000 23 #define SPEAKER_TOP_BACK_LEFT 0x8000 24 #define SPEAKER_TOP_BACK_CENTER 0x10000 25 #define SPEAKER_TOP_BACK_RIGHT 0x20000 121 for(
unsigned walk = 0; walk < 32; walk++) {
122 unsigned query = 1 << walk;
123 if (p_flag & query)
return index;
124 if (p_config & query) index++;
131 unsigned toskip = p_index;
137 if (toskip == 0)
break;
173 if ((p_flag & 0xFFFF) == 0) {
174 rv += 16; p_flag >>= 16;
176 if ((p_flag & 0xFF) == 0) {
177 rv += 8; p_flag >>= 8;
179 if ((p_flag & 0xF) == 0) {
180 rv += 4; p_flag >>= 4;
182 if ((p_flag & 0x3) == 0) {
183 rv += 2; p_flag >>= 2;
185 if ((p_flag & 0x1) == 0) {
186 rv += 1; p_flag >>= 1;
188 PFC_ASSERT( p_flag & 1 );
static const char *const chanNames[]
static void g_formatChannelMaskDesc(unsigned flags, pfc::string_base &out)
static const unsigned g_audio_channel_config_table[]
static const char * g_channel_name_byidx(unsigned p_index)
static unsigned g_channel_config_from_wfx(uint32_t p_wfx)
Helper function; translates WAVEFORMATEXTENSIBLE channel map to audio_chunk channel map...
static unsigned g_find_channel_idx(unsigned p_flag)
unsigned countBits32(uint32_t i)
static unsigned g_count_channels(unsigned p_config)
Counts channels specified by channel map.
static unsigned g_extract_channel_flag(unsigned p_config, unsigned p_index)
Extracts flag describing Nth channel from specified map. Usable to figure what specific channel in a ...
static unsigned g_channel_index_from_flag(unsigned p_config, unsigned p_flag)
Calculates index of a channel specified by p_flag in a stream where channel map is described by p_con...
static unsigned g_guess_channel_config(unsigned count)
Helper function; guesses default channel map for the specified channel count. Returns 0 on failure...
static const unsigned g_audio_channel_config_table_xiph[]
static struct @29 g_translation_table[]
static const char * g_channel_name(unsigned p_flag)
static unsigned g_guess_channel_config_xiph(unsigned count)
Helper function; determines channel map for the specified channel count according to Xiph specs...
static uint32_t g_channel_config_to_wfx(unsigned p_config)
Helper function; translates audio_chunk channel map to WAVEFORMATEXTENSIBLE channel map...