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

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

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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 | « webrtc/modules/audio_coding/neteq/delay_manager.h ('k') | webrtc/modules/audio_coding/neteq/dsp_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/delay_manager.cc
diff --git a/webrtc/modules/audio_coding/neteq/delay_manager.cc b/webrtc/modules/audio_coding/neteq/delay_manager.cc
index a935561eff459bd386f414fc3a54105381718ea7..e7f76f616e9fc04c713467b944b1cf3f244c176c 100644
--- a/webrtc/modules/audio_coding/neteq/delay_manager.cc
+++ b/webrtc/modules/audio_coding/neteq/delay_manager.cc
@@ -22,7 +22,7 @@
namespace webrtc {
-DelayManager::DelayManager(int max_packets_in_buffer,
+DelayManager::DelayManager(size_t max_packets_in_buffer,
DelayPeakDetector* peak_detector)
: first_packet_received_(false),
max_packets_in_buffer_(max_packets_in_buffer),
@@ -239,7 +239,8 @@ void DelayManager::LimitTargetLevel() {
}
// Shift to Q8, then 75%.;
- int max_buffer_packets_q8 = (3 * (max_packets_in_buffer_ << 8)) / 4;
+ int max_buffer_packets_q8 =
+ static_cast<int>((3 * (max_packets_in_buffer_ << 8)) / 4);
target_level_ = std::min(target_level_, max_buffer_packets_q8);
// Sanity check, at least 1 packet (in Q8).
@@ -389,7 +390,8 @@ bool DelayManager::SetMinimumDelay(int delay_ms) {
// |max_packets_in_buffer_|.
if ((maximum_delay_ms_ > 0 && delay_ms > maximum_delay_ms_) ||
(packet_len_ms_ > 0 &&
- delay_ms > 3 * max_packets_in_buffer_ * packet_len_ms_ / 4)) {
+ delay_ms >
+ static_cast<int>(3 * max_packets_in_buffer_ * packet_len_ms_ / 4))) {
return false;
}
minimum_delay_ms_ = delay_ms;
« no previous file with comments | « webrtc/modules/audio_coding/neteq/delay_manager.h ('k') | webrtc/modules/audio_coding/neteq/dsp_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698