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 | |
137 class AudioManagerWin; | 135 class AudioManagerWin; |
138 | 136 |
139 // AudioOutputStream implementation using Windows Core Audio APIs. | 137 // AudioOutputStream implementation using Windows Core Audio APIs. |
140 // The IMMNotificationClient interface enables device event notifications | 138 // The IMMNotificationClient interface enables device event notifications |
141 // related to changes in the status of an audio endpoint device. | 139 // related to changes in the status of an audio endpoint device. |
142 class MEDIA_EXPORT WASAPIAudioOutputStream | 140 class MEDIA_EXPORT WASAPIAudioOutputStream |
143 : public IMMNotificationClient, | 141 : public IMMNotificationClient, |
144 public AudioOutputStream, | 142 public AudioOutputStream, |
145 public base::DelegateSimpleThread::Delegate { | 143 public base::DelegateSimpleThread::Delegate { |
146 public: | 144 public: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 300 |
303 // This event will be signaled when rendering shall stop. | 301 // This event will be signaled when rendering shall stop. |
304 base::win::ScopedHandle stop_render_event_; | 302 base::win::ScopedHandle stop_render_event_; |
305 | 303 |
306 // This event will be signaled when stream switching shall take place. | 304 // This event will be signaled when stream switching shall take place. |
307 base::win::ScopedHandle stream_switch_event_; | 305 base::win::ScopedHandle stream_switch_event_; |
308 | 306 |
309 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); | 307 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); |
310 }; | 308 }; |
311 | 309 |
312 } // namespace media | |
313 | |
314 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ | 310 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ |
OLD | NEW |