| 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 // THREAD SAFETY | 5 // THREAD SAFETY |
| 6 // | 6 // |
| 7 // This class is generally not thread safe. Callers should ensure thread safety. | 7 // This class is generally not thread safe. Callers should ensure thread safety. |
| 8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access | 8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access |
| 9 // to this object across the main thread (for WebAudio APIs) and the | 9 // to this object across the main thread (for WebAudio APIs) and the |
| 10 // media thread (for HTMLMediaElement APIs). | 10 // media thread (for HTMLMediaElement APIs). |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const url::Origin& security_origin, | 41 const url::Origin& security_origin, |
| 42 AudioLatency::LatencyType latency); | 42 AudioLatency::LatencyType latency); |
| 43 | 43 |
| 44 // SwitchableAudioRendererSink implementation. | 44 // SwitchableAudioRendererSink implementation. |
| 45 void Start() override; | 45 void Start() override; |
| 46 void Stop() override; | 46 void Stop() override; |
| 47 void Play() override; | 47 void Play() override; |
| 48 void Pause() override; | 48 void Pause() override; |
| 49 bool SetVolume(double volume) override; | 49 bool SetVolume(double volume) override; |
| 50 OutputDeviceInfo GetOutputDeviceInfo() override; | 50 OutputDeviceInfo GetOutputDeviceInfo() override; |
| 51 bool IsOptimizedForHardwareParameters() override; |
| 51 void Initialize(const AudioParameters& params, | 52 void Initialize(const AudioParameters& params, |
| 52 AudioRendererSink::RenderCallback* renderer) override; | 53 AudioRendererSink::RenderCallback* renderer) override; |
| 53 void SwitchOutputDevice(const std::string& device_id, | 54 void SwitchOutputDevice(const std::string& device_id, |
| 54 const url::Origin& security_origin, | 55 const url::Origin& security_origin, |
| 55 const OutputDeviceStatusCB& callback) override; | 56 const OutputDeviceStatusCB& callback) override; |
| 56 // This is expected to be called on the audio rendering thread. The caller | 57 // This is expected to be called on the audio rendering thread. The caller |
| 57 // must ensure that this input has been added to a mixer before calling the | 58 // must ensure that this input has been added to a mixer before calling the |
| 58 // function, and that it is not removed from the mixer before this function | 59 // function, and that it is not removed from the mixer before this function |
| 59 // returns. | 60 // returns. |
| 60 bool CurrentThreadIsRenderingThread() override; | 61 bool CurrentThreadIsRenderingThread() override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 100 |
| 100 // Error callback for handing to AudioRendererMixer. | 101 // Error callback for handing to AudioRendererMixer. |
| 101 const base::Closure error_cb_; | 102 const base::Closure error_cb_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); | 104 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace media | 107 } // namespace media |
| 107 | 108 |
| 108 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ | 109 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ |
| OLD | NEW |