| 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_INPUT_STREAM_H_ | 5 #ifndef MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ | 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "media/audio/audio_io.h" | 17 #include "media/audio/audio_io.h" |
| 18 #include "media/audio/fake_audio_worker.h" | 18 #include "media/audio/fake_audio_worker.h" |
| 19 #include "media/base/audio_converter.h" | 19 #include "media/base/audio_converter.h" |
| 20 #include "media/base/audio_parameters.h" | 20 #include "media/base/audio_parameters.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace media { | 26 namespace media { |
| 27 | 27 |
| 28 class LoopbackAudioConverter; | 28 class LoopbackAudioConverter; |
| 29 class VirtualAudioOutputStream; | |
| 30 | 29 |
| 31 // VirtualAudioInputStream converts and mixes audio from attached | 30 // VirtualAudioInputStream converts and mixes audio from attached |
| 32 // VirtualAudioOutputStreams into a single stream. It will continuously render | 31 // VirtualAudioOutputStreams into a single stream. It will continuously render |
| 33 // audio until this VirtualAudioInputStream is stopped and closed. | 32 // audio until this VirtualAudioInputStream is stopped and closed. |
| 34 class MEDIA_EXPORT VirtualAudioInputStream : public AudioInputStream { | 33 class MEDIA_EXPORT VirtualAudioInputStream : public AudioInputStream { |
| 35 public: | 34 public: |
| 36 // Callback invoked just after VirtualAudioInputStream is closed. | 35 // Callback invoked just after VirtualAudioInputStream is closed. |
| 37 typedef base::Callback<void(VirtualAudioInputStream* vais)> | 36 typedef base::Callback<void(VirtualAudioInputStream* vais)> |
| 38 AfterCloseCallback; | 37 AfterCloseCallback; |
| 39 | 38 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 std::unique_ptr<AudioBus> audio_bus_; | 110 std::unique_ptr<AudioBus> audio_bus_; |
| 112 | 111 |
| 113 base::ThreadChecker thread_checker_; | 112 base::ThreadChecker thread_checker_; |
| 114 | 113 |
| 115 DISALLOW_COPY_AND_ASSIGN(VirtualAudioInputStream); | 114 DISALLOW_COPY_AND_ASSIGN(VirtualAudioInputStream); |
| 116 }; | 115 }; |
| 117 | 116 |
| 118 } // namespace media | 117 } // namespace media |
| 119 | 118 |
| 120 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ | 119 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_INPUT_STREAM_H_ |
| OLD | NEW |