Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: media/audio/win/audio_low_latency_output_win.h

Issue 11233023: Handle audio device changes on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No ctor thread check. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 extremely
163 // advanced.
163 class MEDIA_EXPORT WASAPIAudioOutputStream 164 class MEDIA_EXPORT WASAPIAudioOutputStream
164 : public IMMNotificationClient, 165 : public IMMNotificationClient,
165 public AudioOutputStream, 166 public AudioOutputStream,
166 public base::DelegateSimpleThread::Delegate { 167 public base::DelegateSimpleThread::Delegate {
167 public: 168 public:
168 // The ctor takes all the usual parameters, plus |manager| which is the 169 // The ctor takes all the usual parameters, plus |manager| which is the
169 // the audio manager who is creating this object. 170 // the audio manager who is creating this object.
170 WASAPIAudioOutputStream(AudioManagerWin* manager, 171 WASAPIAudioOutputStream(AudioManagerWin* manager,
171 const AudioParameters& params, 172 const AudioParameters& params,
172 ERole device_role); 173 ERole device_role);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 363
363 // Container for retrieving data from AudioSourceCallback::OnMoreData(). 364 // Container for retrieving data from AudioSourceCallback::OnMoreData().
364 scoped_ptr<AudioBus> audio_bus_; 365 scoped_ptr<AudioBus> audio_bus_;
365 366
366 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream); 367 DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream);
367 }; 368 };
368 369
369 } // namespace media 370 } // namespace media
370 371
371 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_ 372 #endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698