| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 #include "base/win/scoped_handle.h" | 151 #include "base/win/scoped_handle.h" |
| 152 #include "media/audio/audio_io.h" | 152 #include "media/audio/audio_io.h" |
| 153 #include "media/audio/audio_parameters.h" | 153 #include "media/audio/audio_parameters.h" |
| 154 #include "media/base/media_export.h" | 154 #include "media/base/media_export.h" |
| 155 | 155 |
| 156 namespace media { | 156 namespace media { |
| 157 | 157 |
| 158 class AudioManagerWin; | 158 class AudioManagerWin; |
| 159 | 159 |
| 160 // AudioOutputStream implementation using Windows Core Audio APIs. | 160 // AudioOutputStream implementation using Windows Core Audio APIs. |
| 161 // The IMMNotificationClient interface enables device event notifications | 161 // TODO(henrika): Remove IMMNotificationClient implementation now that we have |
| 162 // related to changes in the status of an audio endpoint device. | 162 // AudioDeviceListenerWin; currently just disabled since extraction is tricky. |
| 163 class MEDIA_EXPORT WASAPIAudioOutputStream | 163 class MEDIA_EXPORT WASAPIAudioOutputStream |
| 164 : public IMMNotificationClient, | 164 : public IMMNotificationClient, |
| 165 public AudioOutputStream, | 165 public AudioOutputStream, |
| 166 public base::DelegateSimpleThread::Delegate { | 166 public base::DelegateSimpleThread::Delegate { |
| 167 public: | 167 public: |
| 168 // The ctor takes all the usual parameters, plus |manager| which is the | 168 // The ctor takes all the usual parameters, plus |manager| which is the |
| 169 // the audio manager who is creating this object. | 169 // the audio manager who is creating this object. |
| 170 WASAPIAudioOutputStream(AudioManagerWin* manager, | 170 WASAPIAudioOutputStream(AudioManagerWin* manager, |
| 171 const AudioParameters& params, | 171 const AudioParameters& params, |
| 172 ERole device_role); | 172 ERole device_role); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 363 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
| 364 scoped_ptr<AudioBus> audio_bus_; | 364 scoped_ptr<AudioBus> audio_bus_; |
| 365 | 365 |
| 366 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); | 366 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 } // namespace media | 369 } // namespace media |
| 370 | 370 |
| 371 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ | 371 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ |
| OLD | NEW |