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

Unified Diff: content/renderer/media/webrtc_audio_renderer.h

Issue 139303016: Feed the render data to MediaStreamAudioProcessor and used AudioBus in render callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checked echo_control_mobile()->is_enabled()) for android and ios Created 6 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
Index: content/renderer/media/webrtc_audio_renderer.h
diff --git a/content/renderer/media/webrtc_audio_renderer.h b/content/renderer/media/webrtc_audio_renderer.h
index 983929a120059ff8b35267dbfd7c338e21e8f859..74f996f183f84412179e69e8d00084cd4962bf8f 100644
--- a/content/renderer/media/webrtc_audio_renderer.h
+++ b/content/renderer/media/webrtc_audio_renderer.h
@@ -96,6 +96,10 @@ class CONTENT_EXPORT WebRtcAudioRenderer
// Used to DCHECK on the expected state.
bool IsStarted() const;
+ // Accessors to the sink audio parameters.
+ int channels() const { return sink_params_.channels(); }
+ int sample_rate() const { return sink_params_.sample_rate(); }
+
private:
// MediaStreamAudioRenderer implementation. This is private since we want
// callers to use proxy objects.
@@ -190,10 +194,6 @@ class CONTENT_EXPORT WebRtcAudioRenderer
// Audio data source from the browser process.
WebRtcAudioRendererSource* source_;
- // Buffers used for temporary storage during render callbacks.
- // Allocated during initialization.
- scoped_ptr<int16[]> buffer_;
-
// Protects access to |state_|, |source_| and |sink_|.
base::Lock lock_;
@@ -217,9 +217,8 @@ class CONTENT_EXPORT WebRtcAudioRenderer
// Saved volume and playing state of the root renderer.
PlayingState playing_state_;
- // The preferred sample rate and buffer sizes provided via the ctor.
- const int sample_rate_;
- const int frames_per_buffer_;
+ // Audio params used by the sink of the renderer.
+ media::AudioParameters sink_params_;
// Maps audio sources to a list of active audio renderers.
// Pointers to PlayingState objects are only kept in this map while the

Powered by Google App Engine
This is Rietveld 408576698