Commit 59419244 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winepulse.drv: Enable compilation with long types.

parent c3440679
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winepulse.drv MODULE = winepulse.drv
UNIXLIB = winepulse.so UNIXLIB = winepulse.so
IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version
......
...@@ -403,7 +403,7 @@ static void get_device_guid(HKEY drv_key, EDataFlow flow, const char *pulse_name ...@@ -403,7 +403,7 @@ static void get_device_guid(HKEY drv_key, EDataFlow flow, const char *pulse_name
status = RegCreateKeyExW(drv_key, key_name, 0, NULL, 0, KEY_READ | KEY_WRITE | KEY_WOW64_64KEY, status = RegCreateKeyExW(drv_key, key_name, 0, NULL, 0, KEY_READ | KEY_WRITE | KEY_WOW64_64KEY,
NULL, &dev_key, NULL); NULL, &dev_key, NULL);
if (status != ERROR_SUCCESS) { if (status != ERROR_SUCCESS) {
ERR("Failed to open registry key for device %s: %u\n", pulse_name, status); ERR("Failed to open registry key for device %s: %lu\n", pulse_name, status);
CoCreateGuid(guid); CoCreateGuid(guid);
return; return;
} }
...@@ -413,7 +413,7 @@ static void get_device_guid(HKEY drv_key, EDataFlow flow, const char *pulse_name ...@@ -413,7 +413,7 @@ static void get_device_guid(HKEY drv_key, EDataFlow flow, const char *pulse_name
CoCreateGuid(guid); CoCreateGuid(guid);
status = RegSetValueExW(dev_key, L"guid", 0, REG_BINARY, (BYTE*)guid, sizeof(*guid)); status = RegSetValueExW(dev_key, L"guid", 0, REG_BINARY, (BYTE*)guid, sizeof(*guid));
if (status != ERROR_SUCCESS) if (status != ERROR_SUCCESS)
ERR("Failed to store device GUID for %s to registry: %u\n", pulse_name, status); ERR("Failed to store device GUID for %s to registry: %lu\n", pulse_name, status);
} }
RegCloseKey(dev_key); RegCloseKey(dev_key);
} }
...@@ -452,7 +452,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **ke ...@@ -452,7 +452,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **ke
status = RegCreateKeyExW(HKEY_CURRENT_USER, drv_key_devicesW, 0, NULL, 0, status = RegCreateKeyExW(HKEY_CURRENT_USER, drv_key_devicesW, 0, NULL, 0,
KEY_WRITE | KEY_WOW64_64KEY, NULL, &drv_key, NULL); KEY_WRITE | KEY_WOW64_64KEY, NULL, &drv_key, NULL);
if (status != ERROR_SUCCESS) { if (status != ERROR_SUCCESS) {
ERR("Failed to open devices registry key: %u\n", status); ERR("Failed to open devices registry key: %lu\n", status);
drv_key = NULL; drv_key = NULL;
} }
...@@ -658,7 +658,7 @@ static ULONG WINAPI AudioClient_AddRef(IAudioClient3 *iface) ...@@ -658,7 +658,7 @@ static ULONG WINAPI AudioClient_AddRef(IAudioClient3 *iface)
ACImpl *This = impl_from_IAudioClient3(iface); ACImpl *This = impl_from_IAudioClient3(iface);
ULONG ref; ULONG ref;
ref = InterlockedIncrement(&This->ref); ref = InterlockedIncrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
return ref; return ref;
} }
...@@ -667,7 +667,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface) ...@@ -667,7 +667,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
ACImpl *This = impl_from_IAudioClient3(iface); ACImpl *This = impl_from_IAudioClient3(iface);
ULONG ref; ULONG ref;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
if (!ref) { if (!ref) {
if (This->pulse_stream) { if (This->pulse_stream) {
pulse_release_stream(This->pulse_stream, This->timer); pulse_release_stream(This->pulse_stream, This->timer);
...@@ -703,15 +703,15 @@ static void dump_fmt(const WAVEFORMATEX *fmt) ...@@ -703,15 +703,15 @@ static void dump_fmt(const WAVEFORMATEX *fmt)
TRACE(")\n"); TRACE(")\n");
TRACE("nChannels: %u\n", fmt->nChannels); TRACE("nChannels: %u\n", fmt->nChannels);
TRACE("nSamplesPerSec: %u\n", fmt->nSamplesPerSec); TRACE("nSamplesPerSec: %lu\n", fmt->nSamplesPerSec);
TRACE("nAvgBytesPerSec: %u\n", fmt->nAvgBytesPerSec); TRACE("nAvgBytesPerSec: %lu\n", fmt->nAvgBytesPerSec);
TRACE("nBlockAlign: %u\n", fmt->nBlockAlign); TRACE("nBlockAlign: %u\n", fmt->nBlockAlign);
TRACE("wBitsPerSample: %u\n", fmt->wBitsPerSample); TRACE("wBitsPerSample: %u\n", fmt->wBitsPerSample);
TRACE("cbSize: %u\n", fmt->cbSize); TRACE("cbSize: %u\n", fmt->cbSize);
if (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { if (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
WAVEFORMATEXTENSIBLE *fmtex = (void*)fmt; WAVEFORMATEXTENSIBLE *fmtex = (void*)fmt;
TRACE("dwChannelMask: %08x\n", fmtex->dwChannelMask); TRACE("dwChannelMask: %08lx\n", fmtex->dwChannelMask);
TRACE("Samples: %04x\n", fmtex->Samples.wReserved); TRACE("Samples: %04x\n", fmtex->Samples.wReserved);
TRACE("SubFormat: %s\n", wine_dbgstr_guid(&fmtex->SubFormat)); TRACE("SubFormat: %s\n", wine_dbgstr_guid(&fmtex->SubFormat));
} }
...@@ -829,7 +829,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -829,7 +829,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
char *name; char *name;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%x, %x, %s, %s, %p, %s)\n", This, mode, flags, TRACE("(%p)->(%x, %lx, %s, %s, %p, %s)\n", This, mode, flags,
wine_dbgstr_longlong(duration), wine_dbgstr_longlong(period), fmt, debugstr_guid(sessionguid)); wine_dbgstr_longlong(duration), wine_dbgstr_longlong(period), fmt, debugstr_guid(sessionguid));
if (!fmt) if (!fmt)
...@@ -851,7 +851,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -851,7 +851,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED | AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED |
AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY |
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM)) { AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM)) {
FIXME("Unknown flags: %08x\n", flags); FIXME("Unknown flags: %08lx\n", flags);
return E_INVALIDARG; return E_INVALIDARG;
} }
...@@ -1128,7 +1128,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface, ...@@ -1128,7 +1128,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface,
if (hr == S_OK && exclusive) if (hr == S_OK && exclusive)
return This->dataflow == eCapture ? AUDCLNT_E_UNSUPPORTED_FORMAT : AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED; return This->dataflow == eCapture ? AUDCLNT_E_UNSUPPORTED_FORMAT : AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
TRACE("returning: %08x %p\n", hr, out ? *out : NULL); TRACE("returning: %08lx %p\n", hr, out ? *out : NULL);
return hr; return hr;
} }
...@@ -1377,7 +1377,7 @@ static HRESULT WINAPI AudioClient_InitializeSharedAudioStream(IAudioClient3 *ifa ...@@ -1377,7 +1377,7 @@ static HRESULT WINAPI AudioClient_InitializeSharedAudioStream(IAudioClient3 *ifa
{ {
ACImpl *This = impl_from_IAudioClient3(iface); ACImpl *This = impl_from_IAudioClient3(iface);
FIXME("(%p)->(0x%x, %u, %p, %s)\n", This, flags, period_frames, format, debugstr_guid(session_guid)); FIXME("(%p)->(0x%lx, %u, %p, %s)\n", This, flags, period_frames, format, debugstr_guid(session_guid));
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -1471,7 +1471,7 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( ...@@ -1471,7 +1471,7 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
ACImpl *This = impl_from_IAudioRenderClient(iface); ACImpl *This = impl_from_IAudioRenderClient(iface);
struct release_render_buffer_params params; struct release_render_buffer_params params;
TRACE("(%p)->(%u, %x)\n", This, written_frames, flags); TRACE("(%p)->(%u, %lx)\n", This, written_frames, flags);
if (!This->pulse_stream) if (!This->pulse_stream)
return AUDCLNT_E_NOT_INITIALIZED; return AUDCLNT_E_NOT_INITIALIZED;
...@@ -1963,7 +1963,7 @@ static ULONG WINAPI AudioSessionControl_AddRef(IAudioSessionControl2 *iface) ...@@ -1963,7 +1963,7 @@ static ULONG WINAPI AudioSessionControl_AddRef(IAudioSessionControl2 *iface)
AudioSessionWrapper *This = impl_from_IAudioSessionControl2(iface); AudioSessionWrapper *This = impl_from_IAudioSessionControl2(iface);
ULONG ref; ULONG ref;
ref = InterlockedIncrement(&This->ref); ref = InterlockedIncrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
return ref; return ref;
} }
...@@ -1972,7 +1972,7 @@ static ULONG WINAPI AudioSessionControl_Release(IAudioSessionControl2 *iface) ...@@ -1972,7 +1972,7 @@ static ULONG WINAPI AudioSessionControl_Release(IAudioSessionControl2 *iface)
AudioSessionWrapper *This = impl_from_IAudioSessionControl2(iface); AudioSessionWrapper *This = impl_from_IAudioSessionControl2(iface);
ULONG ref; ULONG ref;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
if (!ref) { if (!ref) {
if (This->client) { if (This->client) {
This->client->session_wrapper = NULL; This->client->session_wrapper = NULL;
...@@ -2216,7 +2216,7 @@ static ULONG WINAPI AudioSessionManager_AddRef(IAudioSessionManager2 *iface) ...@@ -2216,7 +2216,7 @@ static ULONG WINAPI AudioSessionManager_AddRef(IAudioSessionManager2 *iface)
SessionMgr *This = impl_from_IAudioSessionManager2(iface); SessionMgr *This = impl_from_IAudioSessionManager2(iface);
ULONG ref; ULONG ref;
ref = InterlockedIncrement(&This->ref); ref = InterlockedIncrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
return ref; return ref;
} }
...@@ -2225,7 +2225,7 @@ static ULONG WINAPI AudioSessionManager_Release(IAudioSessionManager2 *iface) ...@@ -2225,7 +2225,7 @@ static ULONG WINAPI AudioSessionManager_Release(IAudioSessionManager2 *iface)
SessionMgr *This = impl_from_IAudioSessionManager2(iface); SessionMgr *This = impl_from_IAudioSessionManager2(iface);
ULONG ref; ULONG ref;
ref = InterlockedDecrement(&This->ref); ref = InterlockedDecrement(&This->ref);
TRACE("(%p) Refcount now %u\n", This, ref); TRACE("(%p) Refcount now %lu\n", This, ref);
if (!ref) if (!ref)
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
return ref; return ref;
...@@ -2240,7 +2240,7 @@ static HRESULT WINAPI AudioSessionManager_GetAudioSessionControl( ...@@ -2240,7 +2240,7 @@ static HRESULT WINAPI AudioSessionManager_GetAudioSessionControl(
AudioSessionWrapper *wrapper; AudioSessionWrapper *wrapper;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%s, %x, %p)\n", This, debugstr_guid(session_guid), TRACE("(%p)->(%s, %lx, %p)\n", This, debugstr_guid(session_guid),
flags, out); flags, out);
hr = get_audio_session(session_guid, This->device, 0, &session); hr = get_audio_session(session_guid, This->device, 0, &session);
...@@ -2267,7 +2267,7 @@ static HRESULT WINAPI AudioSessionManager_GetSimpleAudioVolume( ...@@ -2267,7 +2267,7 @@ static HRESULT WINAPI AudioSessionManager_GetSimpleAudioVolume(
AudioSessionWrapper *wrapper; AudioSessionWrapper *wrapper;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%s, %x, %p)\n", This, debugstr_guid(session_guid), TRACE("(%p)->(%s, %lx, %p)\n", This, debugstr_guid(session_guid),
flags, out); flags, out);
hr = get_audio_session(session_guid, This->device, 0, &session); hr = get_audio_session(session_guid, This->device, 0, &session);
...@@ -2648,7 +2648,7 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI ...@@ -2648,7 +2648,7 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI
char pulse_name[MAX_PULSE_NAME_LEN]; char pulse_name[MAX_PULSE_NAME_LEN];
DWORD size; DWORD size;
TRACE("%s, (%s,%u), %p\n", wine_dbgstr_guid(guid), wine_dbgstr_guid(&prop->fmtid), prop->pid, out); TRACE("%s, (%s,%lu), %p\n", wine_dbgstr_guid(guid), wine_dbgstr_guid(&prop->fmtid), prop->pid, out);
if (!get_pulse_name_by_guid(guid, pulse_name, &params.flow)) if (!get_pulse_name_by_guid(guid, pulse_name, &params.flow))
return E_FAIL; return E_FAIL;
......
...@@ -896,7 +896,7 @@ static HRESULT pulse_spec_from_waveformat(struct pulse_stream *stream, const WAV ...@@ -896,7 +896,7 @@ static HRESULT pulse_spec_from_waveformat(struct pulse_stream *stream, const WAV
if (i < fmt->nChannels || (mask & SPEAKER_RESERVED)) { if (i < fmt->nChannels || (mask & SPEAKER_RESERVED)) {
stream->map.channels = 0; stream->map.channels = 0;
ERR("Invalid channel mask: %i/%i and %x(%x)\n", i, fmt->nChannels, mask, wfe->dwChannelMask); ERR("Invalid channel mask: %i/%i and %x(%x)\n", i, fmt->nChannels, mask, (unsigned)wfe->dwChannelMask);
break; break;
} }
break; break;
...@@ -1018,7 +1018,7 @@ static NTSTATUS pulse_create_stream(void *args) ...@@ -1018,7 +1018,7 @@ static NTSTATUS pulse_create_stream(void *args)
stream->vol[i] = 1.f; stream->vol[i] = 1.f;
hr = pulse_spec_from_waveformat(stream, params->fmt); hr = pulse_spec_from_waveformat(stream, params->fmt);
TRACE("Obtaining format returns %08x\n", hr); TRACE("Obtaining format returns %08x\n", (unsigned)hr);
if (FAILED(hr)) if (FAILED(hr))
goto exit; goto exit;
...@@ -1984,7 +1984,7 @@ static NTSTATUS pulse_get_latency(void *args) ...@@ -1984,7 +1984,7 @@ static NTSTATUS pulse_get_latency(void *args)
lat = attr->fragsize / pa_frame_size(&stream->ss); lat = attr->fragsize / pa_frame_size(&stream->ss);
*params->latency = (lat * 10000000) / stream->ss.rate + pulse_def_period[0]; *params->latency = (lat * 10000000) / stream->ss.rate + pulse_def_period[0];
pulse_unlock(); pulse_unlock();
TRACE("Latency: %u ms\n", (DWORD)(*params->latency / 10000)); TRACE("Latency: %u ms\n", (unsigned)(*params->latency / 10000));
params->result = S_OK; params->result = S_OK;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
......
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