| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // WebRtcAudioCapturerSink implementation. | 71 // WebRtcAudioCapturerSink implementation. |
| 72 | 72 |
| 73 // Called on the AudioInputDevice worker thread. | 73 // Called on the AudioInputDevice worker thread. |
| 74 virtual int CaptureData(const std::vector<int>& channels, | 74 virtual int CaptureData(const std::vector<int>& channels, |
| 75 const int16* audio_data, | 75 const int16* audio_data, |
| 76 int sample_rate, | 76 int sample_rate, |
| 77 int number_of_channels, | 77 int number_of_channels, |
| 78 int number_of_frames, | 78 int number_of_frames, |
| 79 int audio_delay_milliseconds, | 79 int audio_delay_milliseconds, |
| 80 int current_volume, | 80 int current_volume, |
| 81 bool need_audio_processing) OVERRIDE; | 81 bool need_audio_processing, |
| 82 bool key_pressed) OVERRIDE; |
| 82 | 83 |
| 83 // Can be called on different user thread. | 84 // Can be called on different user thread. |
| 84 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; | 85 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; |
| 85 | 86 |
| 86 // media::AudioRendererSink::RenderCallback implementation. | 87 // media::AudioRendererSink::RenderCallback implementation. |
| 87 // Render() is called on the AudioOutputDevice thread and OnRenderError() | 88 // Render() is called on the AudioOutputDevice thread and OnRenderError() |
| 88 // on the IO thread. | 89 // on the IO thread. |
| 89 virtual int Render(media::AudioBus* audio_bus, | 90 virtual int Render(media::AudioBus* audio_bus, |
| 90 int audio_delay_milliseconds) OVERRIDE; | 91 int audio_delay_milliseconds) OVERRIDE; |
| 91 virtual void OnRenderError() OVERRIDE; | 92 virtual void OnRenderError() OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 127 |
| 127 // Protects |loopback_fifo_|, |playing_| and |sink_|. | 128 // Protects |loopback_fifo_|, |playing_| and |sink_|. |
| 128 mutable base::Lock thread_lock_; | 129 mutable base::Lock thread_lock_; |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); | 131 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace content | 134 } // namespace content |
| 134 | 135 |
| 135 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ | 136 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ |
| OLD | NEW |