AudioEncoderPcm16B: Number of bits/sample is 16, not 2
Clearly, this was a case of bit/byte confusion. BUG=none Review-Url: https://codereview.webrtc.org/2904883002 Cr-Commit-Position: refs/heads/master@{#18254}
This commit is contained in:
@ -84,9 +84,10 @@ rtc::Optional<AudioCodecInfo> AudioEncoderPcm16B::QueryAudioEncoder(
|
||||
format.num_channels >= 1) {
|
||||
Config config = CreateConfig(0, format);
|
||||
if (config.IsOk()) {
|
||||
constexpr int bits_per_sample = 16;
|
||||
return rtc::Optional<AudioCodecInfo>(
|
||||
{config.sample_rate_hz, config.num_channels,
|
||||
config.sample_rate_hz * 2 *
|
||||
config.sample_rate_hz * bits_per_sample *
|
||||
rtc::dchecked_cast<int>(config.num_channels)});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user