WASAPI: Add error check for RegisterEndpointNotificationCallback

Log a warning if registering for device change notifications fails.
This is non-fatal but means automatic device switching won't work.
This commit is contained in:
Henrik Rydgård committed 2026-08-04 00:37:55 +02:00
1 parent 95e09324a7
commit fd1e48ecc5
1 file changed
+4 -1
+4 -1
View File
@@ -81,7 +81,10 @@ WASAPIContext::WASAPIContext() : notificationClient_(this) {
enumerator_ = nullptr;
return;
}
enumerator_->RegisterEndpointNotificationCallback(&notificationClient_);
hr = enumerator_->RegisterEndpointNotificationCallback(&notificationClient_);
if (FAILED(hr)) {
WARN_LOG(Log::Audio, "Failed to register endpoint notification callback: %08lx", hr);
}
}
WASAPIContext::~WASAPIContext() {