Loading audio/core/all-versions/default/util/CoreUtils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -66,13 +66,13 @@ status_t CoreUtils::microphoneInfoFromHal( CONVERT_CHECKED( deviceAddressFromHal(halMicInfo.device, halMicInfo.address, &micInfo->deviceAddress), result); size_t chCount; for (chCount = 0; chCount < AUDIO_CHANNEL_COUNT_MAX; ++chCount) { if (halMicInfo.channel_mapping[chCount] == AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED) { int chCount; for (chCount = AUDIO_CHANNEL_COUNT_MAX - 1; chCount >= 0; --chCount) { if (halMicInfo.channel_mapping[chCount] != AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED) { break; } } micInfo->channelMapping.resize(chCount); micInfo->channelMapping.resize(chCount + 1); for (size_t ch = 0; ch < micInfo->channelMapping.size(); ch++) { micInfo->channelMapping[ch] = AudioMicrophoneChannelMapping(halMicInfo.channel_mapping[ch]); } Loading Loading
audio/core/all-versions/default/util/CoreUtils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -66,13 +66,13 @@ status_t CoreUtils::microphoneInfoFromHal( CONVERT_CHECKED( deviceAddressFromHal(halMicInfo.device, halMicInfo.address, &micInfo->deviceAddress), result); size_t chCount; for (chCount = 0; chCount < AUDIO_CHANNEL_COUNT_MAX; ++chCount) { if (halMicInfo.channel_mapping[chCount] == AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED) { int chCount; for (chCount = AUDIO_CHANNEL_COUNT_MAX - 1; chCount >= 0; --chCount) { if (halMicInfo.channel_mapping[chCount] != AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED) { break; } } micInfo->channelMapping.resize(chCount); micInfo->channelMapping.resize(chCount + 1); for (size_t ch = 0; ch < micInfo->channelMapping.size(); ch++) { micInfo->channelMapping[ch] = AudioMicrophoneChannelMapping(halMicInfo.channel_mapping[ch]); } Loading