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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // require the use of the IAudioEndpointVolume". | 54 // require the use of the IAudioEndpointVolume". |
55 // | 55 // |
56 #ifndef MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 56 #ifndef MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
57 #define MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 57 #define MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
58 | 58 |
59 #include <Audioclient.h> | 59 #include <Audioclient.h> |
60 #include <MMDeviceAPI.h> | 60 #include <MMDeviceAPI.h> |
61 #include <stddef.h> | 61 #include <stddef.h> |
62 #include <stdint.h> | 62 #include <stdint.h> |
63 | 63 |
| 64 #include <memory> |
64 #include <string> | 65 #include <string> |
65 | 66 |
66 #include "base/compiler_specific.h" | 67 #include "base/compiler_specific.h" |
67 #include "base/macros.h" | 68 #include "base/macros.h" |
68 #include "base/threading/non_thread_safe.h" | 69 #include "base/threading/non_thread_safe.h" |
69 #include "base/threading/platform_thread.h" | 70 #include "base/threading/platform_thread.h" |
70 #include "base/threading/simple_thread.h" | 71 #include "base/threading/simple_thread.h" |
71 #include "base/win/scoped_co_mem.h" | 72 #include "base/win/scoped_co_mem.h" |
72 #include "base/win/scoped_com_initializer.h" | 73 #include "base/win/scoped_com_initializer.h" |
73 #include "base/win/scoped_comptr.h" | 74 #include "base/win/scoped_comptr.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 198 |
198 // The audio engine will signal this event each time a buffer has been | 199 // The audio engine will signal this event each time a buffer has been |
199 // recorded. | 200 // recorded. |
200 base::win::ScopedHandle audio_samples_ready_event_; | 201 base::win::ScopedHandle audio_samples_ready_event_; |
201 | 202 |
202 // This event will be signaled when capturing shall stop. | 203 // This event will be signaled when capturing shall stop. |
203 base::win::ScopedHandle stop_capture_event_; | 204 base::win::ScopedHandle stop_capture_event_; |
204 | 205 |
205 // Extra audio bus used for storage of deinterleaved data for the OnData | 206 // Extra audio bus used for storage of deinterleaved data for the OnData |
206 // callback. | 207 // callback. |
207 scoped_ptr<media::AudioBus> audio_bus_; | 208 std::unique_ptr<media::AudioBus> audio_bus_; |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); | 210 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream); |
210 }; | 211 }; |
211 | 212 |
212 } // namespace media | 213 } // namespace media |
213 | 214 |
214 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ | 215 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_ |
OLD | NEW |