Chromium Code Reviews| Index: webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
| diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
| index dce5f4c516ae91bd723614a4050ac7ef2ffe98c4..b9b0bd8fe9533290e3c879abf45e4145aeac6910 100644 |
| --- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
| +++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
| @@ -44,6 +44,17 @@ int AudioDecoderPcm16B::DecodeInternal(const uint8_t* encoded, |
| return static_cast<int>(ret); |
| } |
| +AudioDecoder::PacketSplits AudioDecoderPcm16B::SplitPacket( |
| + const uint8_t* payload, |
| + size_t payload_len) const { |
| + // TODO(ossu): Investigate if we can ever get 44.1KHz audio here, in which |
| + // case rounding will break. Consider replacing with |
| + // CheckedDivExact to catch that happening. |
|
kwiberg-webrtc
2016/08/26 12:39:25
Could you handle that by letting SplitBySamples wo
|
| + return SplitBySamples(payload, payload_len, |
| + sample_rate_hz_ * 2 * num_channels_ / 1000, |
| + sample_rate_hz_ / 1000); |
| +} |
| + |
| int AudioDecoderPcm16B::PacketDuration(const uint8_t* encoded, |
| size_t encoded_len) const { |
| // Two encoded byte per sample per channel. |