| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // data to a rendering endpoint buffer. | 232 // data to a rendering endpoint buffer. |
| 233 base::win::ScopedComPtr<IAudioRenderClient> audio_render_client_; | 233 base::win::ScopedComPtr<IAudioRenderClient> audio_render_client_; |
| 234 | 234 |
| 235 // The audio engine will signal this event each time a buffer becomes | 235 // The audio engine will signal this event each time a buffer becomes |
| 236 // ready to be filled by the client. | 236 // ready to be filled by the client. |
| 237 base::win::ScopedHandle audio_samples_render_event_; | 237 base::win::ScopedHandle audio_samples_render_event_; |
| 238 | 238 |
| 239 // This event will be signaled when rendering shall stop. | 239 // This event will be signaled when rendering shall stop. |
| 240 base::win::ScopedHandle stop_render_event_; | 240 base::win::ScopedHandle stop_render_event_; |
| 241 | 241 |
| 242 // A ratio used to convert 100-nanosecond 'pu64QPCPosition' time units |
| 243 // (obtained from IAudioClock::GetPosition()) to raw performance counter |
| 244 // time units. |
| 245 double hns_units_to_perf_count_; |
| 246 |
| 242 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 247 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
| 243 std::unique_ptr<AudioBus> audio_bus_; | 248 std::unique_ptr<AudioBus> audio_bus_; |
| 244 | 249 |
| 245 base::win::ScopedComPtr<IAudioClock> audio_clock_; | 250 base::win::ScopedComPtr<IAudioClock> audio_clock_; |
| 246 | 251 |
| 247 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); | 252 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); |
| 248 }; | 253 }; |
| 249 | 254 |
| 250 } // namespace media | 255 } // namespace media |
| 251 | 256 |
| 252 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ | 257 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ |
| OLD | NEW |