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

Unified Diff: media/base/audio_shifter.h

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 | « content/renderer/media/webrtc_local_audio_renderer.cc ('k') | media/base/audio_shifter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_shifter.h
diff --git a/media/base/audio_shifter.h b/media/base/audio_shifter.h
index e7bc502af3ea9abd3a1fbb4dada563f15f0d21fd..015626922cfe59ca05e31498e42e0a24a92401c0 100644
--- a/media/base/audio_shifter.h
+++ b/media/base/audio_shifter.h
@@ -56,10 +56,13 @@ class MEDIA_EXPORT AudioShifter {
AudioShifter(base::TimeDelta max_buffer_size,
base::TimeDelta clock_accuracy,
base::TimeDelta adjustment_time,
- size_t rate,
+ int rate,
int channels);
~AudioShifter();
+ int sample_rate() const { return rate_; }
+ int channels() const { return channels_; }
+
// Push Audio into the shifter. All inputs must have the same number of
// channels, but bus size can vary. The playout time can be noisy and
// does not have to line up perfectly with the number of samples pushed
@@ -79,9 +82,6 @@ class MEDIA_EXPORT AudioShifter {
// calculate playout_time would be now + audio pipeline delay.
void Pull(AudioBus* output, base::TimeTicks playout_time);
- // Flush audio (but leave timing info)
- void Flush();
-
private:
void Zero(AudioBus* output);
void ResamplerCallback(int frame_delay, AudioBus* destination);
@@ -100,7 +100,8 @@ private:
const base::TimeDelta max_buffer_size_;
const base::TimeDelta clock_accuracy_;
const base::TimeDelta adjustment_time_;
- const size_t rate_;
+ const int rate_;
+ const int channels_;
// The clock smoothers are used to smooth out timestamps
// and adjust for drift and inaccurate clocks.
« no previous file with comments | « content/renderer/media/webrtc_local_audio_renderer.cc ('k') | media/base/audio_shifter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698