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

Unified Diff: media/audio/linux/alsa_input.cc

Issue 11065037: fix the broeken audio for webrtc for precise (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indentation Created 8 years, 2 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: media/audio/linux/alsa_input.cc
diff --git a/media/audio/linux/alsa_input.cc b/media/audio/linux/alsa_input.cc
index 84d29335e78c317e9d070dd3b04c5892afbce31f..ea199cb158b4b430cf25a2c0d6ff65a7ce541037 100644
--- a/media/audio/linux/alsa_input.cc
+++ b/media/audio/linux/alsa_input.cc
@@ -198,7 +198,6 @@ void AlsaPcmInputStream::ReadAudio() {
}
int num_buffers = frames / params_.frames_per_buffer();
- int num_buffers_read = num_buffers;
uint32 hardware_delay_bytes =
static_cast<uint32>(GetCurrentDelay() * params_.GetBytesPerFrame());
double normalized_volume = 0.0;
@@ -221,8 +220,7 @@ void AlsaPcmInputStream::ReadAudio() {
}
}
- next_read_time_ += base::TimeDelta::FromMilliseconds(
- buffer_duration_ms_ * num_buffers_read);
+ next_read_time_ += base::TimeDelta::FromMilliseconds(buffer_duration_ms_);
base::TimeDelta delay = next_read_time_ - base::Time::Now();
if (delay < base::TimeDelta()) {
LOG(WARNING) << "Audio read callback behind schedule by "
« 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