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 AudioOutputStream for Windows using Windows Core Audio | 5 // Implementation of AudioOutputStream for Windows using Windows Core Audio |
6 // WASAPI for low latency rendering. | 6 // WASAPI for low latency rendering. |
7 // | 7 // |
8 // Overview of operation and performance: | 8 // Overview of operation and performance: |
9 // | 9 // |
10 // - An object of WASAPIAudioOutputStream is created by the AudioManager | 10 // - An object of WASAPIAudioOutputStream is created by the AudioManager |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 #include "base/threading/platform_thread.h" | 125 #include "base/threading/platform_thread.h" |
126 #include "base/threading/simple_thread.h" | 126 #include "base/threading/simple_thread.h" |
127 #include "base/win/scoped_co_mem.h" | 127 #include "base/win/scoped_co_mem.h" |
128 #include "base/win/scoped_com_initializer.h" | 128 #include "base/win/scoped_com_initializer.h" |
129 #include "base/win/scoped_comptr.h" | 129 #include "base/win/scoped_comptr.h" |
130 #include "base/win/scoped_handle.h" | 130 #include "base/win/scoped_handle.h" |
131 #include "media/audio/audio_io.h" | 131 #include "media/audio/audio_io.h" |
132 #include "media/audio/audio_parameters.h" | 132 #include "media/audio/audio_parameters.h" |
133 #include "media/base/media_export.h" | 133 #include "media/base/media_export.h" |
134 | 134 |
| 135 namespace media { |
| 136 |
135 class AudioManagerWin; | 137 class AudioManagerWin; |
136 | 138 |
137 // AudioOutputStream implementation using Windows Core Audio APIs. | 139 // AudioOutputStream implementation using Windows Core Audio APIs. |
138 // The IMMNotificationClient interface enables device event notifications | 140 // The IMMNotificationClient interface enables device event notifications |
139 // related to changes in the status of an audio endpoint device. | 141 // related to changes in the status of an audio endpoint device. |
140 class MEDIA_EXPORT WASAPIAudioOutputStream | 142 class MEDIA_EXPORT WASAPIAudioOutputStream |
141 : public IMMNotificationClient, | 143 : public IMMNotificationClient, |
142 public AudioOutputStream, | 144 public AudioOutputStream, |
143 public base::DelegateSimpleThread::Delegate { | 145 public base::DelegateSimpleThread::Delegate { |
144 public: | 146 public: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 302 |
301 // This event will be signaled when rendering shall stop. | 303 // This event will be signaled when rendering shall stop. |
302 base::win::ScopedHandle stop_render_event_; | 304 base::win::ScopedHandle stop_render_event_; |
303 | 305 |
304 // This event will be signaled when stream switching shall take place. | 306 // This event will be signaled when stream switching shall take place. |
305 base::win::ScopedHandle stream_switch_event_; | 307 base::win::ScopedHandle stream_switch_event_; |
306 | 308 |
307 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); | 309 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); |
308 }; | 310 }; |
309 | 311 |
| 312 } // namespace media |
| 313 |
310 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ | 314 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ |
OLD | NEW |