Commit 2ea43e6f authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

winepulse: Move AudioClient's vtable into mmdevapi.

parent 3d28f9d3
......@@ -406,7 +406,7 @@ const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
capture_GetNextPacketSize
};
HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface, REFIID riid, void **ppv)
static HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface, REFIID riid, void **ppv)
{
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
......@@ -431,7 +431,7 @@ HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface, REFIID riid, void **p
return S_OK;
}
ULONG WINAPI client_AddRef(IAudioClient3 *iface)
static ULONG WINAPI client_AddRef(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
ULONG ref = InterlockedIncrement(&This->ref);
......@@ -439,7 +439,7 @@ ULONG WINAPI client_AddRef(IAudioClient3 *iface)
return ref;
}
ULONG WINAPI client_Release(IAudioClient3 *iface)
static ULONG WINAPI client_Release(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
ULONG ref = InterlockedDecrement(&This->ref);
......@@ -467,7 +467,7 @@ ULONG WINAPI client_Release(IAudioClient3 *iface)
return ref;
}
HRESULT WINAPI client_Initialize(IAudioClient3 *iface, AUDCLNT_SHAREMODE mode, DWORD flags,
static HRESULT WINAPI client_Initialize(IAudioClient3 *iface, AUDCLNT_SHAREMODE mode, DWORD flags,
REFERENCE_TIME duration, REFERENCE_TIME period,
const WAVEFORMATEX *fmt, const GUID *sessionguid)
{
......@@ -562,7 +562,7 @@ exit:
return params.result;
}
HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface, UINT32 *out)
static HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface, UINT32 *out)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct get_buffer_size_params params;
......@@ -583,7 +583,7 @@ HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface, UINT32 *out)
return params.result;
}
HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface, REFERENCE_TIME *latency)
static HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface, REFERENCE_TIME *latency)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct get_latency_params params;
......@@ -604,7 +604,7 @@ HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface, REFERENCE_TIME *lat
return params.result;
}
HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface, UINT32 *out)
static HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface, UINT32 *out)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct get_current_padding_params params;
......@@ -625,7 +625,7 @@ HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface, UINT32 *out)
return params.result;
}
HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface, AUDCLNT_SHAREMODE mode,
static HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface, AUDCLNT_SHAREMODE mode,
const WAVEFORMATEX *fmt, WAVEFORMATEX **out)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
......@@ -658,7 +658,7 @@ HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface, AUDCLNT_SHAREMODE
return params.result;
}
HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface, WAVEFORMATEX **pwfx)
static HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface, WAVEFORMATEX **pwfx)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct get_mix_format_params params;
......@@ -687,7 +687,7 @@ HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface, WAVEFORMATEX **pwfx)
return params.result;
}
HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defperiod,
static HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defperiod,
REFERENCE_TIME *minperiod)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
......@@ -708,7 +708,7 @@ HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface, REFERENCE_TIME *defp
return params.result;
}
HRESULT WINAPI client_Start(IAudioClient3 *iface)
static HRESULT WINAPI client_Start(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct start_params params;
......@@ -739,7 +739,7 @@ HRESULT WINAPI client_Start(IAudioClient3 *iface)
return params.result;
}
HRESULT WINAPI client_Stop(IAudioClient3 *iface)
static HRESULT WINAPI client_Stop(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct stop_params params;
......@@ -756,7 +756,7 @@ HRESULT WINAPI client_Stop(IAudioClient3 *iface)
return params.result;
}
HRESULT WINAPI client_Reset(IAudioClient3 *iface)
static HRESULT WINAPI client_Reset(IAudioClient3 *iface)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct reset_params params;
......@@ -773,7 +773,7 @@ HRESULT WINAPI client_Reset(IAudioClient3 *iface)
return params.result;
}
HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface, HANDLE event)
static HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface, HANDLE event)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct set_event_handle_params params;
......@@ -794,7 +794,7 @@ HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface, HANDLE event)
return params.result;
}
HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid, void **ppv)
static HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid, void **ppv)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
HRESULT hr;
......@@ -869,7 +869,7 @@ exit:
return hr;
}
HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface, AUDIO_STREAM_CATEGORY category,
static HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface, AUDIO_STREAM_CATEGORY category,
BOOL *offload_capable)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
......@@ -884,7 +884,7 @@ HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface, AUDIO_STREAM_CATEGO
return S_OK;
}
HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
static HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
......@@ -913,7 +913,7 @@ HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
return S_OK;
}
HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface, const WAVEFORMATEX *format,
static HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface, const WAVEFORMATEX *format,
BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration)
{
......@@ -922,7 +922,7 @@ HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface, const WAVEFORMAT
return E_NOTIMPL;
}
HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
static HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format,
UINT32 *default_period_frames,
UINT32 *unit_period_frames,
......@@ -936,7 +936,7 @@ HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
return E_NOTIMPL;
}
HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
static HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
WAVEFORMATEX **cur_format,
UINT32 *cur_period_frames)
{
......@@ -945,7 +945,7 @@ HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
return E_NOTIMPL;
}
HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, DWORD flags,
static HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, DWORD flags,
UINT32 period_frames,
const WAVEFORMATEX *format,
const GUID *session_guid)
......@@ -955,6 +955,31 @@ HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, DWORD fl
return E_NOTIMPL;
}
const IAudioClient3Vtbl AudioClient3_Vtbl =
{
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
client_GetDevicePeriod,
client_Start,
client_Stop,
client_Reset,
client_SetEventHandle,
client_GetService,
client_IsOffloadCapable,
client_SetClientProperties,
client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream,
};
static HRESULT WINAPI clock_QueryInterface(IAudioClock *iface, REFIID riid, void **ppv)
{
struct audio_client *This = impl_from_IAudioClock(iface);
......
......@@ -66,7 +66,7 @@ static struct list g_sessions = LIST_INIT(g_sessions);
static WCHAR drv_key_devicesW[256];
static const WCHAR guidW[] = {'g','u','i','d',0};
static const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioRenderClientVtbl AudioRenderClient_Vtbl;
extern const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl;
extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl;
......@@ -89,11 +89,6 @@ void DECLSPEC_HIDDEN sessions_unlock(void)
LeaveCriticalSection(&g_sessions_lock);
}
static inline ACImpl *impl_from_IAudioClient3(IAudioClient3 *iface)
{
return CONTAINING_RECORD(iface, ACImpl, IAudioClient3_iface);
}
BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
{
switch (reason)
......@@ -363,13 +358,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return S_OK;
}
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv);
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
extern ULONG WINAPI client_Release(IAudioClient3 *iface);
static void session_init_vols(AudioSession *session, UINT channels)
{
if(session->channel_count < channels){
......@@ -449,88 +437,6 @@ HRESULT get_audio_session(const GUID *sessionguid,
return S_OK;
}
extern HRESULT WINAPI client_Initialize(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, DWORD flags, REFERENCE_TIME duration,
REFERENCE_TIME period, const WAVEFORMATEX *fmt,
const GUID *sessionguid);
extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *out);
extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency);
extern HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *out);
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt,
WAVEFORMATEX **out);
extern HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface,
WAVEFORMATEX **pwfx);
extern HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod);
extern HRESULT WINAPI client_Start(IAudioClient3 *iface);
extern HRESULT WINAPI client_Stop(IAudioClient3 *iface);
extern HRESULT WINAPI client_Reset(IAudioClient3 *iface);
extern HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface,
HANDLE event);
extern HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid,
void **ppv);
extern HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface,
AUDIO_STREAM_CATEGORY category, BOOL *offload_capable);
extern HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop);
extern HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface,
const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration);
extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames,
UINT32 *min_period_frames, UINT32 *max_period_frames);
extern HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
WAVEFORMATEX **cur_format, UINT32 *cur_period_frames);
extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
DWORD flags, UINT32 period_frames, const WAVEFORMATEX *format,
const GUID *session_guid);
static const IAudioClient3Vtbl AudioClient3_Vtbl =
{
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
client_GetDevicePeriod,
client_Start,
client_Stop,
client_Reset,
client_SetEventHandle,
client_GetService,
client_IsOffloadCapable,
client_SetClientProperties,
client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream,
};
HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device,
AudioSessionWrapper **out)
{
......
......@@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(coreaudio);
#define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER)
static const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioRenderClientVtbl AudioRenderClient_Vtbl;
extern const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl;
extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl;
......@@ -83,11 +83,6 @@ void DECLSPEC_HIDDEN sessions_unlock(void)
LeaveCriticalSection(&g_sessions_lock);
}
static inline ACImpl *impl_from_IAudioClient3(IAudioClient3 *iface)
{
return CONTAINING_RECORD(iface, ACImpl, IAudioClient3_iface);
}
BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
{
switch (reason)
......@@ -359,13 +354,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return S_OK;
}
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv);
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
extern ULONG WINAPI client_Release(IAudioClient3 *iface);
static void session_init_vols(AudioSession *session, UINT channels)
{
if(session->channel_count < channels){
......@@ -445,88 +433,6 @@ HRESULT get_audio_session(const GUID *sessionguid,
return S_OK;
}
extern HRESULT WINAPI client_Initialize(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, DWORD flags, REFERENCE_TIME duration,
REFERENCE_TIME period, const WAVEFORMATEX *fmt,
const GUID *sessionguid);
extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *frames);
extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *out);
extern HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *numpad);
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *pwfx,
WAVEFORMATEX **outpwfx);
extern HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface,
WAVEFORMATEX **pwfx);
extern HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod);
extern HRESULT WINAPI client_Start(IAudioClient3 *iface);
extern HRESULT WINAPI client_Stop(IAudioClient3 *iface);
extern HRESULT WINAPI client_Reset(IAudioClient3 *iface);
extern HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface,
HANDLE event);
extern HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid,
void **ppv);
extern HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface,
AUDIO_STREAM_CATEGORY category, BOOL *offload_capable);
extern HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop);
extern HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface,
const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration);
extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames,
UINT32 *min_period_frames, UINT32 *max_period_frames);
extern HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
WAVEFORMATEX **cur_format, UINT32 *cur_period_frames);
extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
DWORD flags, UINT32 period_frames, const WAVEFORMATEX *format,
const GUID *session_guid);
static const IAudioClient3Vtbl AudioClient3_Vtbl =
{
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
client_GetDevicePeriod,
client_Start,
client_Stop,
client_Reset,
client_SetEventHandle,
client_GetService,
client_IsOffloadCapable,
client_SetClientProperties,
client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream,
};
HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device,
AudioSessionWrapper **out)
{
......
......@@ -72,7 +72,7 @@ static CRITICAL_SECTION_DEBUG g_sessions_lock_debug =
static CRITICAL_SECTION g_sessions_lock = { &g_sessions_lock_debug, -1, 0, 0, 0, 0 };
static struct list g_sessions = LIST_INIT(g_sessions);
static const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioRenderClientVtbl AudioRenderClient_Vtbl;
extern const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl;
extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl;
......@@ -95,11 +95,6 @@ void DECLSPEC_HIDDEN sessions_unlock(void)
LeaveCriticalSection(&g_sessions_lock);
}
static inline ACImpl *impl_from_IAudioClient3(IAudioClient3 *iface)
{
return CONTAINING_RECORD(iface, ACImpl, IAudioClient3_iface);
}
BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
{
switch (reason)
......@@ -341,13 +336,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev,
return S_OK;
}
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv);
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
extern ULONG WINAPI client_Release(IAudioClient3 *iface);
static void session_init_vols(AudioSession *session, UINT channels)
{
if(session->channel_count < channels){
......@@ -427,88 +415,6 @@ HRESULT get_audio_session(const GUID *sessionguid,
return S_OK;
}
extern HRESULT WINAPI client_Initialize(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, DWORD flags, REFERENCE_TIME duration,
REFERENCE_TIME period, const WAVEFORMATEX *fmt,
const GUID *sessionguid);
extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *frames);
extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency);
extern HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *numpad);
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt,
WAVEFORMATEX **out);
extern HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface,
WAVEFORMATEX **pwfx);
extern HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod);
extern HRESULT WINAPI client_Start(IAudioClient3 *iface);
extern HRESULT WINAPI client_Stop(IAudioClient3 *iface);
extern HRESULT WINAPI client_Reset(IAudioClient3 *iface);
extern HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface,
HANDLE event);
extern HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid,
void **ppv);
extern HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface,
AUDIO_STREAM_CATEGORY category, BOOL *offload_capable);
extern HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop);
extern HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface,
const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration);
extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames,
UINT32 *min_period_frames, UINT32 *max_period_frames);
extern HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
WAVEFORMATEX **cur_format, UINT32 *cur_period_frames);
extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
DWORD flags, UINT32 period_frames, const WAVEFORMATEX *format,
const GUID *session_guid);
static const IAudioClient3Vtbl AudioClient3_Vtbl =
{
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
client_GetDevicePeriod,
client_Start,
client_Stop,
client_Reset,
client_SetEventHandle,
client_GetService,
client_IsOffloadCapable,
client_SetClientProperties,
client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream,
};
HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device,
AudioSessionWrapper **out)
{
......
......@@ -118,7 +118,7 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
return TRUE;
}
static const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioClient3Vtbl AudioClient3_Vtbl;
extern const IAudioRenderClientVtbl AudioRenderClient_Vtbl;
extern const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl;
extern const IAudioSessionControl2Vtbl AudioSessionControl2_Vtbl;
......@@ -131,11 +131,6 @@ extern const IAudioStreamVolumeVtbl AudioStreamVolume_Vtbl;
extern struct audio_session_wrapper *session_wrapper_create(
struct audio_client *client) DECLSPEC_HIDDEN;
static inline ACImpl *impl_from_IAudioClient3(IAudioClient3 *iface)
{
return CONTAINING_RECORD(iface, ACImpl, IAudioClient3_iface);
}
static void pulse_call(enum unix_funcs code, void *params)
{
NTSTATUS status;
......@@ -377,13 +372,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return S_OK;
}
extern HRESULT WINAPI client_QueryInterface(IAudioClient3 *iface,
REFIID riid, void **ppv);
extern ULONG WINAPI client_AddRef(IAudioClient3 *iface);
extern ULONG WINAPI client_Release(IAudioClient3 *iface);
static void session_init_vols(AudioSession *session, UINT channels)
{
if (session->channel_count < channels) {
......@@ -463,88 +451,6 @@ HRESULT get_audio_session(const GUID *sessionguid,
return S_OK;
}
extern HRESULT WINAPI client_Initialize(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, DWORD flags, REFERENCE_TIME duration,
REFERENCE_TIME period, const WAVEFORMATEX *fmt,
const GUID *sessionguid);
extern HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface,
UINT32 *out);
extern HRESULT WINAPI client_GetStreamLatency(IAudioClient3 *iface,
REFERENCE_TIME *latency);
extern HRESULT WINAPI client_GetCurrentPadding(IAudioClient3 *iface,
UINT32 *out);
extern HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface,
AUDCLNT_SHAREMODE mode, const WAVEFORMATEX *fmt,
WAVEFORMATEX **out);
extern HRESULT WINAPI client_GetMixFormat(IAudioClient3 *iface,
WAVEFORMATEX **pwfx);
extern HRESULT WINAPI client_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod);
extern HRESULT WINAPI client_Start(IAudioClient3 *iface);
extern HRESULT WINAPI client_Stop(IAudioClient3 *iface);
extern HRESULT WINAPI client_Reset(IAudioClient3 *iface);
extern HRESULT WINAPI client_SetEventHandle(IAudioClient3 *iface,
HANDLE event);
extern HRESULT WINAPI client_GetService(IAudioClient3 *iface, REFIID riid,
void **ppv);
extern HRESULT WINAPI client_IsOffloadCapable(IAudioClient3 *iface,
AUDIO_STREAM_CATEGORY category, BOOL *offload_capable);
extern HRESULT WINAPI client_SetClientProperties(IAudioClient3 *iface,
const AudioClientProperties *prop);
extern HRESULT WINAPI client_GetBufferSizeLimits(IAudioClient3 *iface,
const WAVEFORMATEX *format, BOOL event_driven, REFERENCE_TIME *min_duration,
REFERENCE_TIME *max_duration);
extern HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
const WAVEFORMATEX *format, UINT32 *default_period_frames, UINT32 *unit_period_frames,
UINT32 *min_period_frames, UINT32 *max_period_frames);
extern HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
WAVEFORMATEX **cur_format, UINT32 *cur_period_frames);
extern HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface,
DWORD flags, UINT32 period_frames, const WAVEFORMATEX *format,
const GUID *session_guid);
static const IAudioClient3Vtbl AudioClient3_Vtbl =
{
client_QueryInterface,
client_AddRef,
client_Release,
client_Initialize,
client_GetBufferSize,
client_GetStreamLatency,
client_GetCurrentPadding,
client_IsFormatSupported,
client_GetMixFormat,
client_GetDevicePeriod,
client_Start,
client_Stop,
client_Reset,
client_SetEventHandle,
client_GetService,
client_IsOffloadCapable,
client_SetClientProperties,
client_GetBufferSizeLimits,
client_GetSharedModeEnginePeriod,
client_GetCurrentSharedModeEnginePeriod,
client_InitializeSharedAudioStream,
};
HRESULT WINAPI AUDDRV_GetAudioSessionWrapper(const GUID *guid, IMMDevice *device,
AudioSessionWrapper **out)
{
......
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