Update audio_low_latency_input_win.cc

This commit is contained in:
Alexander David Frick 2022-09-03 04:59:18 -05:00 committed by GitHub
parent 0d1b6b92dd
commit 0a707a6c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1466,10 +1466,12 @@ void WASAPIAudioInputStream::SetupConverterAndStoreFormatInfo() {
double new_frames_per_buffer =
input_format_.Format.nSamplesPerSec / buffer_ratio;
const auto input_layout = GuessChannelLayout(input_format_.Format.nChannels);
DCHECK_NE(CHANNEL_LAYOUT_UNSUPPORTED, input_layout);
const auto output_layout = GuessChannelLayout(output_format_.nChannels);
DCHECK_NE(CHANNEL_LAYOUT_UNSUPPORTED, output_layout);
const auto input_layout =
ChannelLayoutConfig::Guess(input_format_.Format.nChannels);
DCHECK_NE(CHANNEL_LAYOUT_UNSUPPORTED, input_layout.channel_layout());
const auto output_layout =
ChannelLayoutConfig::Guess(output_format_.nChannels);
DCHECK_NE(CHANNEL_LAYOUT_UNSUPPORTED, output_layout.channel_layout());
const AudioParameters input(AudioParameters::AUDIO_PCM_LOW_LATENCY,
input_layout, input_format_.Format.nSamplesPerSec,