mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
ao/wasapi: make calling of thread_init consistent with thread_uninit
This commit is contained in:
@@ -126,7 +126,7 @@ static DWORD __stdcall ThreadLoop(void *lpParameter)
|
||||
QS_POSTMESSAGE | QS_SENDMESSAGE);
|
||||
switch (waitstatus) {
|
||||
case WAIT_OBJECT_0: /*shutdown*/
|
||||
wasapi_thread_uninit(state);
|
||||
wasapi_thread_uninit(ao);
|
||||
goto exit_label;
|
||||
case (WAIT_OBJECT_0 + 1): /* feed */
|
||||
thread_feed(ao);
|
||||
|
||||
@@ -976,8 +976,10 @@ exit_label:
|
||||
return -1;
|
||||
}
|
||||
|
||||
void wasapi_thread_uninit(wasapi_state *state)
|
||||
void wasapi_thread_uninit(struct ao *ao)
|
||||
{
|
||||
struct wasapi_state *state = (struct wasapi_state *)ao->priv;
|
||||
|
||||
if (state->pAudioClient)
|
||||
IAudioClient_Stop(state->pAudioClient);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ int wasapi_validate_device(struct mp_log *log, const m_option_t *opt,
|
||||
struct bstr name, struct bstr param);
|
||||
|
||||
int wasapi_thread_init(struct ao *ao);
|
||||
void wasapi_thread_uninit(wasapi_state *state);
|
||||
void wasapi_thread_uninit(struct ao *ao);
|
||||
|
||||
HRESULT wasapi_setup_proxies(wasapi_state *state);
|
||||
void wasapi_release_proxies(wasapi_state *state);
|
||||
|
||||
Reference in New Issue
Block a user