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

Unified Diff: media/audio/win/audio_low_latency_output_win.cc

Issue 11233023: Handle audio device changes on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Callbacks! Created 8 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/win/audio_low_latency_output_win.cc
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index 966f0775dbe43e8b47f8bc3743b8232901ae5fdd..c353cb83a123e05d44bc3f7d264b1fd8bfc6f153 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -292,13 +292,8 @@ bool WASAPIAudioOutputStream::Open() {
return false;
}
- // Register this client as an IMMNotificationClient implementation.
- // Only OnDefaultDeviceChanged() and OnDeviceStateChanged() and are
- // non-trivial.
- hr = device_enumerator_->RegisterEndpointNotificationCallback(this);
-
opened_ = true;
- return SUCCEEDED(hr);
+ return true;
}
void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) {
@@ -411,14 +406,6 @@ void WASAPIAudioOutputStream::Close() {
// It is also valid to call Close() after Start() has been called.
Stop();
- if (opened_ && device_enumerator_) {
- // De-register the IMMNotificationClient callback interface.
- HRESULT hr = device_enumerator_->UnregisterEndpointNotificationCallback(
- this);
- DLOG_IF(ERROR, FAILED(hr)) << "Failed to disable device notifications: "
- << std::hex << hr;
- }
-
// Inform the audio manager that we have been closed. This will cause our
// destruction.
manager_->ReleaseOutputStream(this);

Powered by Google App Engine
This is Rietveld 408576698