diff --git a/modules/audio_processing/test/bitexactness_tools.cc b/modules/audio_processing/test/bitexactness_tools.cc index c49bb5099f..0e9d369452 100644 --- a/modules/audio_processing/test/bitexactness_tools.cc +++ b/modules/audio_processing/test/bitexactness_tools.cc @@ -57,6 +57,7 @@ void ReadFloatSamplesFromStereoFile(size_t samples_per_channel, size_t num_channels, InputAudioFile* stereo_pcm_file, rtc::ArrayView data) { + RTC_DCHECK_LE(num_channels, 2); RTC_DCHECK_EQ(data.size(), samples_per_channel * num_channels); std::vector read_samples(samples_per_channel * 2); stereo_pcm_file->Read(samples_per_channel * 2, read_samples.data()); diff --git a/modules/audio_processing/test/bitexactness_tools.h b/modules/audio_processing/test/bitexactness_tools.h index eb5ee081c3..2d3113276d 100644 --- a/modules/audio_processing/test/bitexactness_tools.h +++ b/modules/audio_processing/test/bitexactness_tools.h @@ -29,7 +29,7 @@ std::string GetApmRenderTestVectorFileName(int sample_rate_hz); // APM bitexactness test. std::string GetApmCaptureTestVectorFileName(int sample_rate_hz); -// Extract float samples from a pcm file. +// Extract float samples of up to two channels from a pcm file. void ReadFloatSamplesFromStereoFile(size_t samples_per_channel, size_t num_channels, InputAudioFile* stereo_pcm_file,