Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc

Issue 2904883002: AudioEncoderPcm16B: Number of bits/sample is 16, not 2 (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc
diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc b/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc
index 442ea662dd336b89c562f61f74de412b2b4addf4..f57cc7ebdcb304f776e1139ab1c2a7e74b4b0bf2 100644
--- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc
+++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc
@@ -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)});
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698