diff --git a/source/main.cpp b/source/main.cpp index 2ede00a..67f55df 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -172,11 +172,13 @@ HRESULT SetMuteGenshin(BOOL bMute) { return hr; hr = m_pEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &pDevice); + m_pEnumerator->Release(); if (FAILED(hr)) return hr; IAudioSessionManager2 *pasm = NULL; hr = pDevice->Activate(__uuidof(IAudioSessionManager2), CLSCTX_ALL, NULL, (void **) &pasm); + pDevice->Release(); if (FAILED(hr)) return hr; @@ -260,4 +262,4 @@ int main() { DestroyTesseract(); system("pause"); return 1; -} \ No newline at end of file +}