mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 01:07:17 +00:00
wineoss: Move get_current_padding to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
984cae317b
commit
cdd19e3d1c
|
@ -827,7 +827,7 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
|
||||||
UINT32 *numpad)
|
UINT32 *numpad)
|
||||||
{
|
{
|
||||||
ACImpl *This = impl_from_IAudioClient3(iface);
|
ACImpl *This = impl_from_IAudioClient3(iface);
|
||||||
struct oss_stream *stream = This->stream;
|
struct get_current_padding_params params;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, numpad);
|
TRACE("(%p)->(%p)\n", This, numpad);
|
||||||
|
|
||||||
|
@ -837,15 +837,12 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
|
||||||
if(!This->stream)
|
if(!This->stream)
|
||||||
return AUDCLNT_E_NOT_INITIALIZED;
|
return AUDCLNT_E_NOT_INITIALIZED;
|
||||||
|
|
||||||
oss_lock(stream);
|
params.stream = This->stream;
|
||||||
|
params.padding = numpad;
|
||||||
*numpad = stream->held_frames;
|
OSS_CALL(get_current_padding, ¶ms);
|
||||||
|
|
||||||
TRACE("padding: %u\n", *numpad);
|
TRACE("padding: %u\n", *numpad);
|
||||||
|
|
||||||
oss_unlock(stream);
|
return params.result;
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface,
|
static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface,
|
||||||
|
|
|
@ -776,6 +776,18 @@ static NTSTATUS get_latency(void *args)
|
||||||
return oss_unlock_result(stream, ¶ms->result, S_OK);
|
return oss_unlock_result(stream, ¶ms->result, S_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NTSTATUS get_current_padding(void *args)
|
||||||
|
{
|
||||||
|
struct get_current_padding_params *params = args;
|
||||||
|
struct oss_stream *stream = params->stream;
|
||||||
|
|
||||||
|
oss_lock(stream);
|
||||||
|
|
||||||
|
*params->padding = stream->held_frames;
|
||||||
|
|
||||||
|
return oss_unlock_result(stream, ¶ms->result, S_OK);
|
||||||
|
}
|
||||||
|
|
||||||
unixlib_entry_t __wine_unix_call_funcs[] =
|
unixlib_entry_t __wine_unix_call_funcs[] =
|
||||||
{
|
{
|
||||||
test_connect,
|
test_connect,
|
||||||
|
@ -786,4 +798,5 @@ unixlib_entry_t __wine_unix_call_funcs[] =
|
||||||
get_mix_format,
|
get_mix_format,
|
||||||
get_buffer_size,
|
get_buffer_size,
|
||||||
get_latency,
|
get_latency,
|
||||||
|
get_current_padding,
|
||||||
};
|
};
|
||||||
|
|
|
@ -120,6 +120,13 @@ struct get_latency_params
|
||||||
REFERENCE_TIME *latency;
|
REFERENCE_TIME *latency;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct get_current_padding_params
|
||||||
|
{
|
||||||
|
struct oss_stream *stream;
|
||||||
|
HRESULT result;
|
||||||
|
UINT32 *padding;
|
||||||
|
};
|
||||||
|
|
||||||
enum oss_funcs
|
enum oss_funcs
|
||||||
{
|
{
|
||||||
oss_test_connect,
|
oss_test_connect,
|
||||||
|
@ -130,6 +137,7 @@ enum oss_funcs
|
||||||
oss_get_mix_format,
|
oss_get_mix_format,
|
||||||
oss_get_buffer_size,
|
oss_get_buffer_size,
|
||||||
oss_get_latency,
|
oss_get_latency,
|
||||||
|
oss_get_current_padding,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern unixlib_handle_t oss_handle;
|
extern unixlib_handle_t oss_handle;
|
||||||
|
|
Loading…
Reference in a new issue