| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ | 5 #ifndef MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ |
| 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ | 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "media/audio/audio_io.h" | 10 #include "media/audio/audio_io.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Construct an audio loopback pathway to the given |target| (not owned). | 31 // Construct an audio loopback pathway to the given |target| (not owned). |
| 32 // |target| must outlive this instance. | 32 // |target| must outlive this instance. |
| 33 VirtualAudioOutputStream(const AudioParameters& params, | 33 VirtualAudioOutputStream(const AudioParameters& params, |
| 34 VirtualAudioInputStream* target, | 34 VirtualAudioInputStream* target, |
| 35 const AfterCloseCallback& after_close_cb); | 35 const AfterCloseCallback& after_close_cb); |
| 36 | 36 |
| 37 virtual ~VirtualAudioOutputStream(); | 37 virtual ~VirtualAudioOutputStream(); |
| 38 | 38 |
| 39 // AudioOutputStream: | 39 // AudioOutputStream: |
| 40 virtual bool Open() OVERRIDE; | 40 virtual bool Open() override; |
| 41 virtual void Start(AudioSourceCallback* callback) OVERRIDE; | 41 virtual void Start(AudioSourceCallback* callback) override; |
| 42 virtual void Stop() OVERRIDE; | 42 virtual void Stop() override; |
| 43 virtual void SetVolume(double volume) OVERRIDE; | 43 virtual void SetVolume(double volume) override; |
| 44 virtual void GetVolume(double* volume) OVERRIDE; | 44 virtual void GetVolume(double* volume) override; |
| 45 virtual void Close() OVERRIDE; | 45 virtual void Close() override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // AudioConverter::InputCallback: | 48 // AudioConverter::InputCallback: |
| 49 virtual double ProvideInput(AudioBus* audio_bus, | 49 virtual double ProvideInput(AudioBus* audio_bus, |
| 50 base::TimeDelta buffer_delay) OVERRIDE; | 50 base::TimeDelta buffer_delay) override; |
| 51 | 51 |
| 52 const AudioParameters params_; | 52 const AudioParameters params_; |
| 53 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. | 53 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. |
| 54 // This pointer should always be valid because VirtualAudioInputStream should | 54 // This pointer should always be valid because VirtualAudioInputStream should |
| 55 // outlive this class. | 55 // outlive this class. |
| 56 VirtualAudioInputStream* const target_input_stream_; | 56 VirtualAudioInputStream* const target_input_stream_; |
| 57 | 57 |
| 58 AfterCloseCallback after_close_cb_; | 58 AfterCloseCallback after_close_cb_; |
| 59 | 59 |
| 60 AudioSourceCallback* callback_; | 60 AudioSourceCallback* callback_; |
| 61 double volume_; | 61 double volume_; |
| 62 | 62 |
| 63 base::ThreadChecker thread_checker_; | 63 base::ThreadChecker thread_checker_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); | 65 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace media | 68 } // namespace media |
| 69 | 69 |
| 70 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ | 70 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ |
| OLD | NEW |