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 44894b52e8c67f1c9eaa28ed582fffb9fee00b34..79e3a5e043049e8cc3ba7472c5471374d2422b92 100644 |
--- a/content/renderer/media/webrtc_audio_renderer.h |
+++ b/content/renderer/media/webrtc_audio_renderer.h |
@@ -53,6 +53,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. |
@@ -102,10 +106,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_; |
@@ -126,9 +126,12 @@ class CONTENT_EXPORT WebRtcAudioRenderer |
// Delay due to the FIFO in milliseconds. |
int fifo_delay_milliseconds_; |
- // 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 |
+ // the renderer. |
+ // Only modified in the Initialize() on the main render thread. |
+ int sample_rate_; |
+ int number_of_channels_; |
+ int frames_per_buffer_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); |
}; |