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 25 matching lines...) Expand all Loading... |
36 const AfterCloseCallback& after_close_cb); | 36 const AfterCloseCallback& after_close_cb); |
37 | 37 |
38 ~VirtualAudioOutputStream() override; | 38 ~VirtualAudioOutputStream() override; |
39 | 39 |
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 EnableDebugRecording(const base::FilePath& file_name) override {} |
| 47 void DisableDebugRecording() override {} |
46 void Close() override; | 48 void Close() override; |
47 | 49 |
48 private: | 50 private: |
49 // AudioConverter::InputCallback: | 51 // AudioConverter::InputCallback: |
50 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override; | 52 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override; |
51 | 53 |
52 const AudioParameters params_; | 54 const AudioParameters params_; |
53 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. | 55 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. |
54 // This pointer should always be valid because VirtualAudioInputStream should | 56 // This pointer should always be valid because VirtualAudioInputStream should |
55 // outlive this class. | 57 // outlive this class. |
56 VirtualAudioInputStream* const target_input_stream_; | 58 VirtualAudioInputStream* const target_input_stream_; |
57 | 59 |
58 AfterCloseCallback after_close_cb_; | 60 AfterCloseCallback after_close_cb_; |
59 | 61 |
60 AudioSourceCallback* callback_; | 62 AudioSourceCallback* callback_; |
61 double volume_; | 63 double volume_; |
62 | 64 |
63 base::ThreadChecker thread_checker_; | 65 base::ThreadChecker thread_checker_; |
64 | 66 |
65 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); | 67 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); |
66 }; | 68 }; |
67 | 69 |
68 } // namespace media | 70 } // namespace media |
69 | 71 |
70 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ | 72 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ |
OLD | NEW |