| 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_AUDIO_CLOCKLESS_AUDIO_SINK_H_ | 5 #ifndef MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ |
| 6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ | 6 #define MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // AudioRendererSink implementation. | 26 // AudioRendererSink implementation. |
| 27 void Initialize(const AudioParameters& params, | 27 void Initialize(const AudioParameters& params, |
| 28 RenderCallback* callback) override; | 28 RenderCallback* callback) override; |
| 29 void Start() override; | 29 void Start() override; |
| 30 void Stop() override; | 30 void Stop() override; |
| 31 void Pause() override; | 31 void Pause() override; |
| 32 void Play() override; | 32 void Play() override; |
| 33 bool SetVolume(double volume) override; | 33 bool SetVolume(double volume) override; |
| 34 OutputDeviceInfo GetOutputDeviceInfo() override; | 34 OutputDeviceInfo GetOutputDeviceInfo() override; |
| 35 bool IsOptimizedForHardwareParameters() override; |
| 35 bool CurrentThreadIsRenderingThread() override; | 36 bool CurrentThreadIsRenderingThread() override; |
| 36 | 37 |
| 37 // Returns the time taken to consume all the audio. | 38 // Returns the time taken to consume all the audio. |
| 38 base::TimeDelta render_time() { return playback_time_; } | 39 base::TimeDelta render_time() { return playback_time_; } |
| 39 | 40 |
| 40 // Enables audio frame hashing. Must be called prior to Initialize(). | 41 // Enables audio frame hashing. Must be called prior to Initialize(). |
| 41 void StartAudioHashForTesting(); | 42 void StartAudioHashForTesting(); |
| 42 | 43 |
| 43 // Returns the hash of all audio frames seen since construction. | 44 // Returns the hash of all audio frames seen since construction. |
| 44 std::string GetAudioHashForTesting(); | 45 std::string GetAudioHashForTesting(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 55 | 56 |
| 56 // Time taken in last set of Render() calls. | 57 // Time taken in last set of Render() calls. |
| 57 base::TimeDelta playback_time_; | 58 base::TimeDelta playback_time_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); | 60 DISALLOW_COPY_AND_ASSIGN(ClocklessAudioSink); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace media | 63 } // namespace media |
| 63 | 64 |
| 64 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ | 65 #endif // MEDIA_AUDIO_CLOCKLESS_AUDIO_SINK_H_ |
| OLD | NEW |