| 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, uint32 total_bytes_delay) override; | 42 int OnMoreData(AudioBus* dest, |
| 43 uint32_t total_bytes_delay, |
| 44 uint32_t frames_skipped) override; |
| 43 void OnError(AudioOutputStream* stream) override; | 45 void OnError(AudioOutputStream* stream) override; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 ~AudioOutputStreamSink() override; | 48 ~AudioOutputStreamSink() override; |
| 47 void ClearCallback(); | 49 void ClearCallback(); |
| 48 | 50 |
| 49 // Helper methods for running AudioManager methods on the audio thread. | 51 // Helper methods for running AudioManager methods on the audio thread. |
| 50 void DoStart(const AudioParameters& params); | 52 void DoStart(const AudioParameters& params); |
| 51 void DoStop(); | 53 void DoStop(); |
| 52 void DoPause(); | 54 void DoPause(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 | 78 |
| 77 // The actual AudioOutputStream, must only be accessed on the audio thread. | 79 // The actual AudioOutputStream, must only be accessed on the audio thread. |
| 78 AudioOutputStream* stream_; | 80 AudioOutputStream* stream_; |
| 79 | 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); | 82 DISALLOW_COPY_AND_ASSIGN(AudioOutputStreamSink); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namepace media | 85 } // namepace media |
| 84 | 86 |
| 85 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ | 87 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_STREAM_SINK_H_ |
| OLD | NEW |