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

Unified Diff: media/base/audio_shifter.cc

Issue 1633423002: MediaStream audio rendering: Bypass audio processing for non-WebRTC cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to TrackAudioRenderer header to explain it does not handle remote WebRTC tracks. Created 4 years, 10 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 | « media/base/audio_shifter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_shifter.cc
diff --git a/media/base/audio_shifter.cc b/media/base/audio_shifter.cc
index f5aee2c0e6b81c0e80af6e1a028a92743876ff5a..c88af3ac2304f0247e403ae91348deba03fb60bf 100644
--- a/media/base/audio_shifter.cc
+++ b/media/base/audio_shifter.cc
@@ -87,22 +87,24 @@ AudioShifter::AudioQueueEntry::~AudioQueueEntry() {}
AudioShifter::AudioShifter(base::TimeDelta max_buffer_size,
base::TimeDelta clock_accuracy,
base::TimeDelta adjustment_time,
- size_t rate,
- int channels) :
- max_buffer_size_(max_buffer_size),
- clock_accuracy_(clock_accuracy),
- adjustment_time_(adjustment_time),
- rate_(rate),
- input_clock_smoother_(new ClockSmoother(clock_accuracy)),
- output_clock_smoother_(new ClockSmoother(clock_accuracy)),
- running_(false),
- position_(0),
- previous_requested_samples_(0),
- resampler_(channels, 1.0, 96,
- base::Bind(&AudioShifter::ResamplerCallback,
- base::Unretained(this))),
- current_ratio_(1.0) {
-}
+ int rate,
+ int channels)
+ : max_buffer_size_(max_buffer_size),
+ clock_accuracy_(clock_accuracy),
+ adjustment_time_(adjustment_time),
+ rate_(rate),
+ channels_(channels),
+ input_clock_smoother_(new ClockSmoother(clock_accuracy)),
+ output_clock_smoother_(new ClockSmoother(clock_accuracy)),
+ running_(false),
+ position_(0),
+ previous_requested_samples_(0),
+ resampler_(
+ channels,
+ 1.0,
+ 96,
+ base::Bind(&AudioShifter::ResamplerCallback, base::Unretained(this))),
+ current_ratio_(1.0) {}
AudioShifter::~AudioShifter() {}
@@ -270,15 +272,6 @@ void AudioShifter::ResamplerCallback(int frame_delay, AudioBus* destination) {
}
}
-void AudioShifter::Flush() {
- resampler_.Flush();
- position_ = 0;
- queue_.clear();
- running_ = false;
- previous_playout_time_ = base::TimeTicks();
- bias_ = base::TimeDelta();
-}
-
void AudioShifter::Zero(AudioBus* output) {
output->Zero();
running_ = false;
« no previous file with comments | « media/base/audio_shifter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698