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 // Implementation of AudioInputStream for Windows using Windows Core Audio | 5 // Implementation of AudioInputStream for Windows using Windows Core Audio |
6 // WASAPI for low latency capturing. | 6 // WASAPI for low latency capturing. |
7 // | 7 // |
8 // Overview of operation: | 8 // Overview of operation: |
9 // | 9 // |
10 // - An object of WASAPIAudioInputStream is created by the AudioManager | 10 // - An object of WASAPIAudioInputStream is created by the AudioManager |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "base/threading/platform_thread.h" | 70 #include "base/threading/platform_thread.h" |
71 #include "base/threading/simple_thread.h" | 71 #include "base/threading/simple_thread.h" |
72 #include "base/win/scoped_co_mem.h" | 72 #include "base/win/scoped_co_mem.h" |
73 #include "base/win/scoped_com_initializer.h" | 73 #include "base/win/scoped_com_initializer.h" |
74 #include "base/win/scoped_comptr.h" | 74 #include "base/win/scoped_comptr.h" |
75 #include "base/win/scoped_handle.h" | 75 #include "base/win/scoped_handle.h" |
76 #include "media/audio/audio_input_stream_impl.h" | 76 #include "media/audio/audio_input_stream_impl.h" |
77 #include "media/audio/audio_parameters.h" | 77 #include "media/audio/audio_parameters.h" |
78 #include "media/base/media_export.h" | 78 #include "media/base/media_export.h" |
79 | 79 |
| 80 namespace media { |
| 81 |
80 class AudioManagerWin; | 82 class AudioManagerWin; |
81 | 83 |
82 // AudioInputStream implementation using Windows Core Audio APIs. | 84 // AudioInputStream implementation using Windows Core Audio APIs. |
83 class MEDIA_EXPORT WASAPIAudioInputStream | 85 class MEDIA_EXPORT WASAPIAudioInputStream |
84 : public AudioInputStreamImpl, | 86 : public AudioInputStreamImpl, |
85 public base::DelegateSimpleThread::Delegate, | 87 public base::DelegateSimpleThread::Delegate, |
86 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 88 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
87 public: | 89 public: |
88 // The ctor takes all the usual parameters, plus |manager| which is the | 90 // The ctor takes all the usual parameters, plus |manager| which is the |
89 // the audio manager who is creating this object. | 91 // the audio manager who is creating this object. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // The audio engine will signal this event each time a buffer has been | 205 // The audio engine will signal this event each time a buffer has been |
204 // recorded. | 206 // recorded. |
205 base::win::ScopedHandle audio_samples_ready_event_; | 207 base::win::ScopedHandle audio_samples_ready_event_; |
206 | 208 |
207 // This event will be signaled when capturing shall stop. | 209 // This event will be signaled when capturing shall stop. |
208 base::win::ScopedHandle stop_capture_event_; | 210 base::win::ScopedHandle stop_capture_event_; |
209 | 211 |
210 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); | 212 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
211 }; | 213 }; |
212 | 214 |
| 215 } // namespace media |
| 216 |
213 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 217 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
OLD | NEW |