Commit e054f729 authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winepulse: Move AudioClient2 into mmdevapi.

parent 4050ceb2
...@@ -194,6 +194,59 @@ const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl = ...@@ -194,6 +194,59 @@ const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
capture_GetNextPacketSize capture_GetNextPacketSize
}; };
HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface, AUDIO_STREAM_CATEGORY category,
BOOL *offload_capable)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
if (!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
const Win8AudioClientProperties *legacy_prop = (const Win8AudioClientProperties *)prop;
TRACE("(%p)->(%p)\n", This, prop);
if (!legacy_prop)
return E_POINTER;
if (legacy_prop->cbSize == sizeof(AudioClientProperties)) {
TRACE("{ bIsOffload: %u, eCategory: 0x%x, Options: 0x%x }\n", legacy_prop->bIsOffload,
legacy_prop->eCategory,
prop->Options);
} else if(legacy_prop->cbSize == sizeof(Win8AudioClientProperties)) {
TRACE("{ bIsOffload: %u, eCategory: 0x%x }\n", legacy_prop->bIsOffload,
legacy_prop->eCategory);
} else {
WARN("Unsupported Size = %d\n", legacy_prop->cbSize);
return E_INVALIDARG;
}
if (legacy_prop->bIsOffload)
return AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE;
return S_OK;
}
HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface, const WAVEFORMATEX *format,
BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
FIXME("(%p)->(%p, %u, %p, %p) - stub\n", This, format, event_driven, min_duration, max_duration);
return E_NOTIMPL;
}
HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface, HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, const WAVEFORMATEX *format,
UINT32 *default_period_frames, UINT32 *default_period_frames,
......
...@@ -1071,63 +1071,15 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid, ...@@ -1071,63 +1071,15 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid,
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static HRESULT WINAPI AudioClient_IsOffloadCapable(IAudioClient3 *iface, extern HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface,
AUDIO_STREAM_CATEGORY category, BOOL *offload_capable) AUDIO_STREAM_CATEGORY category, BOOL *offload_capable);
{
ACImpl *This = impl_from_IAudioClient3(iface);
TRACE("(%p)->(0x%x, %p)\n", This, category, offload_capable);
if(!offload_capable)
return E_INVALIDARG;
*offload_capable = FALSE;
return S_OK;
}
static HRESULT WINAPI AudioClient_SetClientProperties(IAudioClient3 *iface, extern HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop) const AudioClientProperties *prop);
{
ACImpl *This = impl_from_IAudioClient3(iface);
const Win8AudioClientProperties *legacy_prop = (const Win8AudioClientProperties *)prop;
TRACE("(%p)->(%p)\n", This, prop);
if(!legacy_prop)
return E_POINTER;
if(legacy_prop->cbSize == sizeof(AudioClientProperties)){ extern HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface,
TRACE("{ bIsOffload: %u, eCategory: 0x%x, Options: 0x%x }\n",
legacy_prop->bIsOffload,
legacy_prop->eCategory,
prop->Options);
}else if(legacy_prop->cbSize == sizeof(Win8AudioClientProperties)){
TRACE("{ bIsOffload: %u, eCategory: 0x%x }\n",
legacy_prop->bIsOffload,
legacy_prop->eCategory);
}else{
WARN("Unsupported Size = %d\n", legacy_prop->cbSize);
return E_INVALIDARG;
}
if(legacy_prop->bIsOffload)
return AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE;
return S_OK;
}
static HRESULT WINAPI AudioClient_GetBufferSizeLimits(IAudioClient3 *iface,
const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration, const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration) REFERENCE_TIME *max_duration);
{
ACImpl *This = impl_from_IAudioClient3(iface);
FIXME("(%p)->(%p, %u, %p, %p)\n", This, format, event_driven, min_duration, max_duration);
return E_NOTIMPL;
}
extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface, extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames, const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames,
...@@ -1157,9 +1109,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl = ...@@ -1157,9 +1109,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_Reset, AudioClient_Reset,
AudioClient_SetEventHandle, AudioClient_SetEventHandle,
AudioClient_GetService, AudioClient_GetService,
AudioClient_IsOffloadCapable, client_IsOffloadCapable,
AudioClient_SetClientProperties, client_SetClientProperties,
AudioClient_GetBufferSizeLimits, client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod, client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod, client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream, client_InitializeSharedAudioStream,
......
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