Commit def6e1c7 authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winecoreaudio: Use mmdevapi's stream_release.

parent d49a6b77
...@@ -75,6 +75,8 @@ extern HRESULT main_loop_start(void) DECLSPEC_HIDDEN; ...@@ -75,6 +75,8 @@ extern HRESULT main_loop_start(void) DECLSPEC_HIDDEN;
extern struct audio_session_wrapper *session_wrapper_create( extern struct audio_session_wrapper *session_wrapper_create(
struct audio_client *client) DECLSPEC_HIDDEN; struct audio_client *client) DECLSPEC_HIDDEN;
extern HRESULT stream_release(stream_handle stream, HANDLE timer_thread);
extern WCHAR *get_application_name(void); extern WCHAR *get_application_name(void);
void DECLSPEC_HIDDEN sessions_lock(void) void DECLSPEC_HIDDEN sessions_lock(void)
...@@ -417,10 +419,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface) ...@@ -417,10 +419,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
TRACE("(%p) Refcount now %lu\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
if(!ref){ if(!ref){
if(This->stream){ if(This->stream){
struct release_stream_params params; stream_release(This->stream, This->timer_thread);
params.stream = This->stream;
params.timer_thread = This->timer_thread;
UNIX_CALL(release_stream, &params);
This->stream = 0; This->stream = 0;
sessions_lock(); sessions_lock();
...@@ -554,7 +553,6 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -554,7 +553,6 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
const GUID *sessionguid) const GUID *sessionguid)
{ {
ACImpl *This = impl_from_IAudioClient3(iface); ACImpl *This = impl_from_IAudioClient3(iface);
struct release_stream_params release_params;
struct create_stream_params params; struct create_stream_params params;
stream_handle stream; stream_handle stream;
UINT32 i; UINT32 i;
...@@ -635,8 +633,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -635,8 +633,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
end: end:
if(FAILED(params.result)){ if(FAILED(params.result)){
release_params.stream = stream; stream_release(stream, NULL);
UNIX_CALL(release_stream, &release_params);
HeapFree(GetProcessHeap(), 0, This->vols); HeapFree(GetProcessHeap(), 0, This->vols);
This->vols = NULL; This->vols = NULL;
}else{ }else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment