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_FAKE_AUDIO_OUTPUT_STREAM_H_ | 5 #ifndef MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
6 #define MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ | 6 #define MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "media/audio/audio_io.h" | 11 #include "media/audio/audio_io.h" |
11 #include "media/audio/fake_audio_worker.h" | 12 #include "media/audio/fake_audio_worker.h" |
12 #include "media/base/audio_parameters.h" | 13 #include "media/base/audio_parameters.h" |
13 | 14 |
14 namespace media { | 15 namespace media { |
15 | 16 |
16 class AudioManagerBase; | 17 class AudioManagerBase; |
17 | 18 |
18 // A fake implementation of AudioOutputStream. Used for testing and when a real | 19 // A fake implementation of AudioOutputStream. Used for testing and when a real |
19 // audio output device is unavailable or refusing output (e.g. remote desktop). | 20 // audio output device is unavailable or refusing output (e.g. remote desktop). |
(...skipping 15 matching lines...) Expand all Loading... |
35 FakeAudioOutputStream(AudioManagerBase* manager, | 36 FakeAudioOutputStream(AudioManagerBase* manager, |
36 const AudioParameters& params); | 37 const AudioParameters& params); |
37 ~FakeAudioOutputStream() override; | 38 ~FakeAudioOutputStream() override; |
38 | 39 |
39 // Task that periodically calls OnMoreData() to consume audio data. | 40 // Task that periodically calls OnMoreData() to consume audio data. |
40 void CallOnMoreData(); | 41 void CallOnMoreData(); |
41 | 42 |
42 AudioManagerBase* audio_manager_; | 43 AudioManagerBase* audio_manager_; |
43 AudioSourceCallback* callback_; | 44 AudioSourceCallback* callback_; |
44 FakeAudioWorker fake_worker_; | 45 FakeAudioWorker fake_worker_; |
45 scoped_ptr<AudioBus> audio_bus_; | 46 std::unique_ptr<AudioBus> audio_bus_; |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); | 48 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace media | 51 } // namespace media |
51 | 52 |
52 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ | 53 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ |
OLD | NEW |