| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void Initialize(const AudioParameters& params, | 32 void Initialize(const AudioParameters& params, |
| 33 RenderCallback* callback) override; | 33 RenderCallback* callback) override; |
| 34 void Start() override; | 34 void Start() override; |
| 35 void Stop() override; | 35 void Stop() override; |
| 36 void Pause() override; | 36 void Pause() override; |
| 37 void Play() override; | 37 void Play() override; |
| 38 bool SetVolume(double volume) override; | 38 bool SetVolume(double volume) override; |
| 39 OutputDevice* GetOutputDevice() override; | 39 OutputDevice* GetOutputDevice() override; |
| 40 | 40 |
| 41 // AudioSourceCallback implementation. | 41 // AudioSourceCallback implementation. |
| 42 int OnMoreData(AudioBus* dest, | 42 int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) override; |
| 43 uint32_t total_bytes_delay, | |
| 44 uint32_t frames_skipped) override; | |
| 45 void OnError(AudioOutputStream* stream) override; | 43 void OnError(AudioOutputStream* stream) override; |
| 46 | 44 |
| 47 private: | 45 private: |
| 48 ~AudioOutputStreamSink() override; | 46 ~AudioOutputStreamSink() override; |
| 49 void ClearCallback(); | 47 void ClearCallback(); |
| 50 | 48 |
| 51 // Helper methods for running AudioManager methods on the audio thread. | 49 // Helper methods for running AudioManager methods on the audio thread. |
| 52 void DoStart(const AudioParameters& params); | 50 void DoStart(const AudioParameters& params); |
| 53 void DoStop(); | 51 void DoStop(); |
| 54 void DoPause(); | 52 void DoPause(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 78 | 76 |
| 79 // The actual AudioOutputStream, must only be accessed on the audio thread. | 77 // The actual AudioOutputStream, must only be accessed on the audio thread. |
| 80 AudioOutputStream* stream_; | 78 AudioOutputStream* stream_; |
| 81 | 79 |
| 82 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); | 80 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); |
| 83 }; | 81 }; |
| 84 | 82 |
| 85 } // namepace media | 83 } // namepace media |
| 86 | 84 |
| 87 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ | 85 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| OLD | NEW |