Commit d1ab2940 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wineoss: Move get_next_packet_size to the unixlib.

parent b8a2198d
......@@ -1364,20 +1364,18 @@ static HRESULT WINAPI AudioCaptureClient_GetNextPacketSize(
IAudioCaptureClient *iface, UINT32 *frames)
{
ACImpl *This = impl_from_IAudioCaptureClient(iface);
struct oss_stream *stream = This->stream;
struct get_next_packet_size_params params;
TRACE("(%p)->(%p)\n", This, frames);
if(!frames)
return E_POINTER;
oss_lock(stream);
*frames = stream->held_frames < stream->period_frames ? 0 : stream->period_frames;
oss_unlock(stream);
params.stream = This->stream;
params.frames = frames;
OSS_CALL(get_next_packet_size, &params);
return S_OK;
return params.result;
}
static const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
......
......@@ -1243,6 +1243,19 @@ static NTSTATUS get_current_padding(void *args)
return oss_unlock_result(stream, &params->result, S_OK);
}
static NTSTATUS get_next_packet_size(void *args)
{
struct get_next_packet_size_params *params = args;
struct oss_stream *stream = params->stream;
UINT32 *frames = params->frames;
oss_lock(stream);
*frames = stream->held_frames < stream->period_frames ? 0 : stream->period_frames;
return oss_unlock_result(stream, &params->result, S_OK);
}
static NTSTATUS set_event_handle(void *args)
{
struct set_event_handle_params *params = args;
......@@ -1282,5 +1295,6 @@ unixlib_entry_t __wine_unix_call_funcs[] =
get_buffer_size,
get_latency,
get_current_padding,
get_next_packet_size,
set_event_handle,
};
......@@ -186,6 +186,13 @@ struct get_current_padding_params
UINT32 *padding;
};
struct get_next_packet_size_params
{
struct oss_stream *stream;
HRESULT result;
UINT32 *frames;
};
struct set_event_handle_params
{
struct oss_stream *stream;
......@@ -212,6 +219,7 @@ enum oss_funcs
oss_get_buffer_size,
oss_get_latency,
oss_get_current_padding,
oss_get_next_packet_size,
oss_set_event_handle,
};
......
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