| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // RestartableAudioRendererSink implementation. | 59 // RestartableAudioRendererSink implementation. |
| 60 void Initialize(const AudioParameters& params, | 60 void Initialize(const AudioParameters& params, |
| 61 RenderCallback* renderer) override; | 61 RenderCallback* renderer) override; |
| 62 void Start() override; | 62 void Start() override; |
| 63 void Stop() override; | 63 void Stop() override; |
| 64 void Play() override; | 64 void Play() override; |
| 65 void Pause() override; | 65 void Pause() override; |
| 66 bool SetVolume(double volume) override; | 66 bool SetVolume(double volume) override; |
| 67 OutputDeviceInfo GetOutputDeviceInfo() override; | 67 OutputDeviceInfo GetOutputDeviceInfo() override; |
| 68 bool IsOptimizedForHardwareParameters() override; |
| 68 bool CurrentThreadIsRenderingThread() override; | 69 bool CurrentThreadIsRenderingThread() override; |
| 69 void SwitchOutputDevice(const std::string& device_id, | 70 void SwitchOutputDevice(const std::string& device_id, |
| 70 const url::Origin& security_origin, | 71 const url::Origin& security_origin, |
| 71 const OutputDeviceStatusCB& callback) override; | 72 const OutputDeviceStatusCB& callback) override; |
| 72 | 73 |
| 73 // These methods allow a client to get a copy of the rendered audio. | 74 // These methods allow a client to get a copy of the rendered audio. |
| 74 void SetCopyAudioCallback(const CopyAudioCB& callback); | 75 void SetCopyAudioCallback(const CopyAudioCB& callback); |
| 75 void ClearCopyAudioCallback(); | 76 void ClearCopyAudioCallback(); |
| 76 | 77 |
| 77 int RenderForTesting(AudioBus* audio_bus); | 78 int RenderForTesting(AudioBus* audio_bus); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 112 |
| 112 // NOTE: Weak pointers must be invalidated before all other member variables. | 113 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 113 base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_; | 114 base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_; |
| 114 | 115 |
| 115 DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl); | 116 DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl); |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace media | 119 } // namespace media |
| 119 | 120 |
| 120 #endif // MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | 121 #endif // MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |
| OLD | NEW |