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:
return params.result;
}
static HRESULT WINAPI AudioClient_GetBufferSize(IAudioClient3 *iface,
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;
extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *out);
if(!This->stream)
return AUDCLNT_E_NOT_INITIALIZED;
extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency);
params.stream = This->stream;
params.frames = 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_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *out);
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt,
......@@ -765,9 +706,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_AddRef,
AudioClient_Release,
AudioClient_Initialize,
AudioClient_GetBufferSize,
AudioClient_GetStreamLatency,
AudioClient_GetCurrentPadding,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
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