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

Unified Diff: webrtc/modules/audio_coding/neteq/decision_logic.cc

Issue 2326953003: Added a ParsePayload method to AudioDecoder. (Closed)
Patch Set: Added some casts from size_t to int. Created 4 years, 3 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
Index: webrtc/modules/audio_coding/neteq/decision_logic.cc
diff --git a/webrtc/modules/audio_coding/neteq/decision_logic.cc b/webrtc/modules/audio_coding/neteq/decision_logic.cc
index 545d1d62455cad94f728e89bc8f67557fffdec92..1c77914bb0d6c329730f5ac0e7a844c5f3b0208d 100644
--- a/webrtc/modules/audio_coding/neteq/decision_logic.cc
+++ b/webrtc/modules/audio_coding/neteq/decision_logic.cc
@@ -108,24 +108,19 @@ Operations DecisionLogic::GetDecision(const SyncBuffer& sync_buffer,
bool play_dtmf,
size_t generated_noise_samples,
bool* reset_decoder) {
- if (prev_mode == kModeRfc3389Cng ||
- prev_mode == kModeCodecInternalCng ||
- prev_mode == kModeExpand) {
- // If last mode was CNG (or Expand, since this could be covering up for
- // a lost CNG packet), remember that CNG is on. This is needed if comfort
- // noise is interrupted by DTMF.
- if (prev_mode == kModeRfc3389Cng) {
- cng_state_ = kCngRfc3389On;
- } else if (prev_mode == kModeCodecInternalCng) {
- cng_state_ = kCngInternalOn;
- }
+ // If last mode was CNG (or Expand, since this could be covering up for
+ // a lost CNG packet), remember that CNG is on. This is needed if comfort
+ // noise is interrupted by DTMF.
+ if (prev_mode == kModeRfc3389Cng) {
+ cng_state_ = kCngRfc3389On;
+ } else if (prev_mode == kModeCodecInternalCng) {
+ cng_state_ = kCngInternalOn;
}
const size_t samples_left =
sync_buffer.FutureLength() - expand.overlap_length();
const size_t cur_size_samples =
- samples_left + packet_buffer_.NumSamplesInBuffer(decoder_database_,
- decoder_frame_length);
+ samples_left + packet_buffer_.NumSamplesInBuffer(decoder_frame_length);
prev_time_scale_ = prev_time_scale_ &&
(prev_mode == kModeAccelerateSuccess ||
« no previous file with comments | « webrtc/modules/audio_coding/codecs/audio_decoder.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698