| 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 27 matching lines...) Expand all Loading... |
| 38 void Stop() override; | 38 void Stop() override; |
| 39 void Pause() override; | 39 void Pause() override; |
| 40 void Play() override; | 40 void Play() override; |
| 41 bool SetVolume(double volume) override; | 41 bool SetVolume(double volume) override; |
| 42 OutputDeviceInfo GetOutputDeviceInfo() override; | 42 OutputDeviceInfo GetOutputDeviceInfo() override; |
| 43 bool CurrentThreadIsRenderingThread() override; | 43 bool CurrentThreadIsRenderingThread() override; |
| 44 | 44 |
| 45 // AudioSourceCallback implementation. | 45 // AudioSourceCallback implementation. |
| 46 int OnMoreData(AudioBus* dest, | 46 int OnMoreData(AudioBus* dest, |
| 47 uint32_t total_bytes_delay, | 47 uint32_t total_bytes_delay, |
| 48 uint32_t frames_skipped) override; | 48 uint32_t frames_skipped, |
| 49 const AudioTimestamp& timestamp) override; |
| 49 void OnError(AudioOutputStream* stream) override; | 50 void OnError(AudioOutputStream* stream) override; |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 ~AudioOutputStreamSink() override; | 53 ~AudioOutputStreamSink() override; |
| 53 void ClearCallback(); | 54 void ClearCallback(); |
| 54 | 55 |
| 55 // Helper methods for running AudioManager methods on the audio thread. | 56 // Helper methods for running AudioManager methods on the audio thread. |
| 56 void DoStart(const AudioParameters& params); | 57 void DoStart(const AudioParameters& params); |
| 57 void DoStop(); | 58 void DoStop(); |
| 58 void DoPause(); | 59 void DoPause(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 82 | 83 |
| 83 // The actual AudioOutputStream, must only be accessed on the audio thread. | 84 // The actual AudioOutputStream, must only be accessed on the audio thread. |
| 84 AudioOutputStream* stream_; | 85 AudioOutputStream* stream_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); | 87 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namepace media | 90 } // namepace media |
| 90 | 91 |
| 91 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ | 92 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| OLD | NEW |