Chromium Code Reviews| 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..92c85cc55c2c3d2b5eef0848e5e3a71aea6edee5 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 number_of_channels_; } |
| + int sample_rate() const { return 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,12 @@ 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_; |
| + // The sample rate, number of channels and buffer sizes used by the sink of |
|
tommi (sloooow) - chröme
2014/02/17 15:03:44
should we just store a |const AudioParameters| her
no longer working on chromium
2014/02/17 17:15:32
This can't be a const since it will be modified in
tommi (sloooow) - chröme
2014/02/18 12:54:12
yeah since we're already storing the same paramete
no longer working on chromium
2014/02/18 17:37:53
Done.
|
| + // the renderer. |
| + // Only modified in the Initialize() on the main render thread. |
| + int sample_rate_; |
| + int number_of_channels_; |
| + int frames_per_buffer_; |
| // Maps audio sources to a list of active audio renderers. |
| // Pointers to PlayingState objects are only kept in this map while the |