Commit 896855c5 authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winealsa: Use mmdevapi's AudioClient's GetCurrentPadding, GetStreamLatency, GetBufferSize.

parent 182ae5b1
...@@ -648,73 +648,14 @@ exit: ...@@ -648,73 +648,14 @@ exit:
return params.result; return params.result;
} }
static HRESULT WINAPI AudioClient_GetBufferSize(IAudioClient3 *iface, extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *out) UINT32 *out);
{
ACImpl *This = impl_from_IAudioClient3(iface);
struct get_buffer_size_params params;
TRACE("(%p)->(%p)\n", This, out);
if(!out)
return E_POINTER;
if(!This->stream) extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
return AUDCLNT_E_NOT_INITIALIZED; REFERENCE_TIME *latency);
params.stream = This->stream; extern HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface,
params.frames = out; UINT32 *out);
ALSA_CALL(get_buffer_size, &params);
return params.result;
}
static HRESULT WINAPI AudioClient_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency)
{
ACImpl *This = impl_from_IAudioClient3(iface);
struct get_latency_params params;
TRACE("(%p)->(%p)\n", This, latency);
if(!latency)
return E_POINTER;
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
params.stream = This->stream;
params.latency = latency;
ALSA_CALL(get_latency, &params);
return params.result;
}
static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *out)
{
ACImpl *This = impl_from_IAudioClient3(iface);
struct get_current_padding_params params;
TRACE("(%p)->(%p)\n", This, out);
if(!out)
return E_POINTER;
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
params.stream = This->stream;
params.padding = out;
ALSA_CALL(get_current_padding, &params);
TRACE("pad: %u\n", *out);
return params.result;
}
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface, extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt, AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt,
...@@ -765,9 +706,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl = ...@@ -765,9 +706,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_AddRef, AudioClient_AddRef,
AudioClient_Release, AudioClient_Release,
AudioClient_Initialize, AudioClient_Initialize,
AudioClient_GetBufferSize, client_GetBufferSize,
AudioClient_GetStreamLatency, client_GetStreamLatency,
AudioClient_GetCurrentPadding, client_GetCurrentPadding,
client_IsFormatSupported, client_IsFormatSupported,
client_GetMixFormat, client_GetMixFormat,
client_GetDevicePeriod, client_GetDevicePeriod,
......
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