| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AUDIO_OUTPUT_STREAM_SINK_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // RestartableAudioRendererSink implementation. | 35 // RestartableAudioRendererSink implementation. |
| 36 void Initialize(const AudioParameters& params, | 36 void Initialize(const AudioParameters& params, |
| 37 RenderCallback* callback) override; | 37 RenderCallback* callback) override; |
| 38 void Start() override; | 38 void Start() override; |
| 39 void Stop() override; | 39 void Stop() override; |
| 40 void Pause() override; | 40 void Pause() override; |
| 41 void Play() override; | 41 void Play() override; |
| 42 bool SetVolume(double volume) override; | 42 bool SetVolume(double volume) override; |
| 43 OutputDeviceInfo GetOutputDeviceInfo() override; | 43 OutputDeviceInfo GetOutputDeviceInfo() override; |
| 44 bool IsOptimizedForHardwareParameters() override; |
| 44 bool CurrentThreadIsRenderingThread() override; | 45 bool CurrentThreadIsRenderingThread() override; |
| 45 | 46 |
| 46 // AudioSourceCallback implementation. | 47 // AudioSourceCallback implementation. |
| 47 int OnMoreData(base::TimeDelta delay, | 48 int OnMoreData(base::TimeDelta delay, |
| 48 base::TimeTicks delay_timestamp, | 49 base::TimeTicks delay_timestamp, |
| 49 int prior_frames_skipped, | 50 int prior_frames_skipped, |
| 50 AudioBus* dest) override; | 51 AudioBus* dest) override; |
| 51 void OnError(AudioOutputStream* stream) override; | 52 void OnError(AudioOutputStream* stream) override; |
| 52 | 53 |
| 53 private: | 54 private: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 84 | 85 |
| 85 // The actual AudioOutputStream, must only be accessed on the audio thread. | 86 // The actual AudioOutputStream, must only be accessed on the audio thread. |
| 86 AudioOutputStream* stream_; | 87 AudioOutputStream* stream_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); | 89 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace media | 92 } // namespace media |
| 92 | 93 |
| 93 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ | 94 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| OLD | NEW |