wineoss: Move get_next_packet_size 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
b8a2198d40
commit
d1ab294002
|
@ -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);
|
||||
params.stream = This->stream;
|
||||
params.frames = frames;
|
||||
OSS_CALL(get_next_packet_size, ¶ms);
|
||||
|
||||
*frames = stream->held_frames < stream->period_frames ? 0 : stream->period_frames;
|
||||
|
||||
oss_unlock(stream);
|
||||
|
||||
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, ¶ms->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, ¶ms->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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue