void wasapi_change_uninit(struct ao *ao) { struct wasapi_state *state = (struct wasapi_state *)ao->priv; struct change_notify *change = &state->change; if(state->pEnumerator && change->client.lpVtbl) IMMDeviceEnumerator_UnregisterEndpointNotificationCallback( state->pEnumerator, (IMMNotificationClient *)change); if (change->monitored) CoTaskMemFree(change->monitored); }
void wasapi_change_uninit(struct ao *ao) { struct wasapi_state *state = ao->priv; struct change_notify *change = &state->change; if (change->pEnumerator && change->client.lpVtbl) { IMMDeviceEnumerator_UnregisterEndpointNotificationCallback( change->pEnumerator, (IMMNotificationClient *)change); } SAFE_RELEASE(change->pEnumerator, IMMDeviceEnumerator_Release(change->pEnumerator)); }
JNIEXPORT void JNICALL Java_org_jitsi_impl_neomedia_jmfext_media_protocol_wasapi_WASAPI_IMMDeviceEnumerator_1Release (JNIEnv *env, jclass clazz, jlong thiz) { IMMDeviceEnumerator *iMMDeviceEnumerator = (IMMDeviceEnumerator *) (intptr_t) thiz; /* * There is statically allocated IMMNotificationClient instance which is to * be registered with every IMMDeviceEnumerator instance. */ IMMDeviceEnumerator_UnregisterEndpointNotificationCallback( iMMDeviceEnumerator, (IMMNotificationClient *) &WASAPI_iMMNotificationClient); IMMDeviceEnumerator_Release(iMMDeviceEnumerator); }