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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // AudioOutputStream: | 40 // AudioOutputStream: |
41 bool Open() override; | 41 bool Open() override; |
42 void Start(AudioSourceCallback* callback) override; | 42 void Start(AudioSourceCallback* callback) override; |
43 void Stop() override; | 43 void Stop() override; |
44 void SetVolume(double volume) override; | 44 void SetVolume(double volume) override; |
45 void GetVolume(double* volume) override; | 45 void GetVolume(double* volume) override; |
46 void Close() override; | 46 void Close() override; |
47 | 47 |
48 private: | 48 private: |
49 // AudioConverter::InputCallback: | 49 // AudioConverter::InputCallback: |
50 double ProvideInput(AudioBus* audio_bus, | 50 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override; |
51 base::TimeDelta buffer_delay) override; | |
52 | 51 |
53 const AudioParameters params_; | 52 const AudioParameters params_; |
54 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. | 53 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. |
55 // This pointer should always be valid because VirtualAudioInputStream should | 54 // This pointer should always be valid because VirtualAudioInputStream should |
56 // outlive this class. | 55 // outlive this class. |
57 VirtualAudioInputStream* const target_input_stream_; | 56 VirtualAudioInputStream* const target_input_stream_; |
58 | 57 |
59 AfterCloseCallback after_close_cb_; | 58 AfterCloseCallback after_close_cb_; |
60 | 59 |
61 AudioSourceCallback* callback_; | 60 AudioSourceCallback* callback_; |
62 double volume_; | 61 double volume_; |
63 | 62 |
64 base::ThreadChecker thread_checker_; | 63 base::ThreadChecker thread_checker_; |
65 | 64 |
66 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); | 65 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); |
67 }; | 66 }; |
68 | 67 |
69 } // namespace media | 68 } // namespace media |
70 | 69 |
71 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ | 70 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ |
OLD | NEW |