Commit 7219e6ec authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

wineoss.drv: Enable compilation with long types.

parent ed1b8cc1
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wineoss.drv MODULE = wineoss.drv
UNIXLIB = wineoss.so UNIXLIB = wineoss.so
IMPORTS = uuid ole32 user32 advapi32 IMPORTS = uuid ole32 user32 advapi32
......
...@@ -57,7 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(midi); ...@@ -57,7 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(midi);
static void notify_client(struct notify_context *notify) static void notify_client(struct notify_context *notify)
{ {
TRACE("dev_id = %d msg = %d param1 = %04lX param2 = %04lX\n", TRACE("dev_id = %d msg = %d param1 = %04IX param2 = %04IX\n",
notify->dev_id, notify->msg, notify->param_1, notify->param_2); notify->dev_id, notify->msg, notify->param_1, notify->param_2);
DriverCallback(notify->callback, notify->flags, notify->device, notify->msg, DriverCallback(notify->callback, notify->flags, notify->device, notify->msg,
...@@ -78,7 +78,7 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -78,7 +78,7 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
struct notify_context notify; struct notify_context notify;
UINT err; UINT err;
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", TRACE("(%04X, %04X, %08IX, %08IX, %08IX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2); wDevID, wMsg, dwUser, dwParam1, dwParam2);
params.dev_id = wDevID; params.dev_id = wDevID;
...@@ -108,7 +108,7 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -108,7 +108,7 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
struct notify_context notify; struct notify_context notify;
UINT err; UINT err;
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", TRACE("(%04X, %04X, %08IX, %08IX, %08IX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2); wDevID, wMsg, dwUser, dwParam1, dwParam2);
params.dev_id = wDevID; params.dev_id = wDevID;
...@@ -150,7 +150,7 @@ static DWORD WINAPI notify_thread(void *p) ...@@ -150,7 +150,7 @@ static DWORD WINAPI notify_thread(void *p)
LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
LPARAM dwParam1, LPARAM dwParam2) LPARAM dwParam1, LPARAM dwParam2)
{ {
TRACE("(%08lX, %p, %08X, %08lX, %08lX)\n", TRACE("(%08IX, %p, %08X, %08IX, %08IX)\n",
dwDevID, hDriv, wMsg, dwParam1, dwParam2); dwDevID, hDriv, wMsg, dwParam1, dwParam2);
switch(wMsg) { switch(wMsg) {
......
...@@ -42,7 +42,7 @@ DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -42,7 +42,7 @@ DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
struct aux_message_params params; struct aux_message_params params;
UINT err; UINT err;
TRACE("(%04X, %04X, %08lX, %08lX, %08lX);\n", TRACE("(%04X, %04X, %08IX, %08IX, %08IX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2); wDevID, wMsg, dwUser, dwParam1, dwParam2);
params.dev_id = wDevID; params.dev_id = wDevID;
......
...@@ -272,7 +272,7 @@ static void set_device_guid(EDataFlow flow, HKEY drv_key, const WCHAR *key_name, ...@@ -272,7 +272,7 @@ static void set_device_guid(EDataFlow flow, HKEY drv_key, const WCHAR *key_name,
lr = RegCreateKeyExW(HKEY_CURRENT_USER, drv_key_devicesW, 0, NULL, 0, KEY_WRITE, lr = RegCreateKeyExW(HKEY_CURRENT_USER, drv_key_devicesW, 0, NULL, 0, KEY_WRITE,
NULL, &drv_key, NULL); NULL, &drv_key, NULL);
if(lr != ERROR_SUCCESS){ if(lr != ERROR_SUCCESS){
ERR("RegCreateKeyEx(drv_key) failed: %u\n", lr); ERR("RegCreateKeyEx(drv_key) failed: %lu\n", lr);
return; return;
} }
opened = TRUE; opened = TRUE;
...@@ -281,14 +281,14 @@ static void set_device_guid(EDataFlow flow, HKEY drv_key, const WCHAR *key_name, ...@@ -281,14 +281,14 @@ static void set_device_guid(EDataFlow flow, HKEY drv_key, const WCHAR *key_name,
lr = RegCreateKeyExW(drv_key, key_name, 0, NULL, 0, KEY_WRITE, lr = RegCreateKeyExW(drv_key, key_name, 0, NULL, 0, KEY_WRITE,
NULL, &key, NULL); NULL, &key, NULL);
if(lr != ERROR_SUCCESS){ if(lr != ERROR_SUCCESS){
ERR("RegCreateKeyEx(%s) failed: %u\n", wine_dbgstr_w(key_name), lr); ERR("RegCreateKeyEx(%s) failed: %lu\n", wine_dbgstr_w(key_name), lr);
goto exit; goto exit;
} }
lr = RegSetValueExW(key, guidW, 0, REG_BINARY, (BYTE*)guid, lr = RegSetValueExW(key, guidW, 0, REG_BINARY, (BYTE*)guid,
sizeof(GUID)); sizeof(GUID));
if(lr != ERROR_SUCCESS) if(lr != ERROR_SUCCESS)
ERR("RegSetValueEx(%s\\guid) failed: %u\n", wine_dbgstr_w(key_name), lr); ERR("RegSetValueEx(%s\\guid) failed: %lu\n", wine_dbgstr_w(key_name), lr);
RegCloseKey(key); RegCloseKey(key);
exit: exit:
...@@ -318,7 +318,7 @@ static void get_device_guid(EDataFlow flow, const char *device, GUID *guid) ...@@ -318,7 +318,7 @@ static void get_device_guid(EDataFlow flow, const char *device, GUID *guid)
RegCloseKey(key); RegCloseKey(key);
return; return;
} }
ERR("Invalid type for device %s GUID: %u; ignoring and overwriting\n", ERR("Invalid type for device %s GUID: %lu; ignoring and overwriting\n",
wine_dbgstr_w(key_name), type); wine_dbgstr_w(key_name), type);
} }
RegCloseKey(dev_key); RegCloseKey(dev_key);
...@@ -505,7 +505,7 @@ static ULONG WINAPI AudioClient_AddRef(IAudioClient3 *iface) ...@@ -505,7 +505,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;
} }
...@@ -515,7 +515,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface) ...@@ -515,7 +515,7 @@ static ULONG WINAPI AudioClient_Release(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){
IAudioClient3_Stop(iface); IAudioClient3_Stop(iface);
IMMDevice_Release(This->parent); IMMDevice_Release(This->parent);
...@@ -553,15 +553,15 @@ static void dump_fmt(const WAVEFORMATEX *fmt) ...@@ -553,15 +553,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));
} }
...@@ -656,7 +656,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -656,7 +656,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
stream_handle stream; stream_handle stream;
unsigned int i; unsigned int i;
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)
...@@ -677,7 +677,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -677,7 +677,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;
} }
...@@ -1147,7 +1147,7 @@ static HRESULT WINAPI AudioClient_InitializeSharedAudioStream(IAudioClient3 *ifa ...@@ -1147,7 +1147,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;
} }
...@@ -1240,7 +1240,7 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( ...@@ -1240,7 +1240,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);
params.stream = This->stream; params.stream = This->stream;
params.written_frames = written_frames; params.written_frames = written_frames;
...@@ -1548,7 +1548,7 @@ static ULONG WINAPI AudioSessionControl_AddRef(IAudioSessionControl2 *iface) ...@@ -1548,7 +1548,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;
} }
...@@ -1557,7 +1557,7 @@ static ULONG WINAPI AudioSessionControl_Release(IAudioSessionControl2 *iface) ...@@ -1557,7 +1557,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){
EnterCriticalSection(&g_sessions_lock); EnterCriticalSection(&g_sessions_lock);
...@@ -2239,7 +2239,7 @@ static ULONG WINAPI AudioSessionManager_AddRef(IAudioSessionManager2 *iface) ...@@ -2239,7 +2239,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;
} }
...@@ -2248,7 +2248,7 @@ static ULONG WINAPI AudioSessionManager_Release(IAudioSessionManager2 *iface) ...@@ -2248,7 +2248,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;
...@@ -2263,7 +2263,7 @@ static HRESULT WINAPI AudioSessionManager_GetAudioSessionControl( ...@@ -2263,7 +2263,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);
...@@ -2290,7 +2290,7 @@ static HRESULT WINAPI AudioSessionManager_GetSimpleAudioVolume( ...@@ -2290,7 +2290,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);
......
...@@ -531,7 +531,7 @@ static HRESULT setup_oss_device(AUDCLNT_SHAREMODE share, int fd, ...@@ -531,7 +531,7 @@ static HRESULT setup_oss_device(AUDCLNT_SHAREMODE share, int fd,
} }
free(closest); free(closest);
TRACE("returning: %08x\n", ret); TRACE("returning: %08x\n", (unsigned)ret);
return ret; return ret;
} }
......
...@@ -397,12 +397,13 @@ static UINT midi_init(void) ...@@ -397,12 +397,13 @@ static UINT midi_init(void)
FIXME("Synthesizer supports MIDI in. Not yet supported.\n"); FIXME("Synthesizer supports MIDI in. Not yet supported.\n");
TRACE("SynthOut[%d]\tOSS info: synth type=%d/%d capa=%x\n", TRACE("SynthOut[%d]\tOSS info: synth type=%d/%d capa=%x\n",
i, sinfo.synth_type, sinfo.synth_subtype, sinfo.capabilities); i, sinfo.synth_type, sinfo.synth_subtype, (unsigned)sinfo.capabilities);
} }
TRACE("SynthOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n", TRACE("SynthOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n",
i, wine_dbgstr_w(dest->caps.szPname), dest->caps.wTechnology, i, wine_dbgstr_w(dest->caps.szPname), dest->caps.wTechnology,
dest->caps.wVoices, dest->caps.wNotes, dest->caps.wChannelMask, dest->caps.dwSupport); dest->caps.wVoices, dest->caps.wNotes, dest->caps.wChannelMask,
(unsigned)dest->caps.dwSupport);
} }
/* find how many MIDI devices are there in the system */ /* find how many MIDI devices are there in the system */
...@@ -492,10 +493,10 @@ static UINT midi_init(void) ...@@ -492,10 +493,10 @@ static UINT midi_init(void)
TRACE("OSS info: midi[%d] dev-type=%d capa=%x\n" TRACE("OSS info: midi[%d] dev-type=%d capa=%x\n"
"\tMidiOut[%d] name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n" "\tMidiOut[%d] name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n"
"\tMidiIn [%d] name='%s' support=%d\n", "\tMidiIn [%d] name='%s' support=%d\n",
i, minfo.dev_type, minfo.capabilities, i, minfo.dev_type, (unsigned)minfo.capabilities,
synth_devs + i, wine_dbgstr_w(dest->caps.szPname), dest->caps.wTechnology, synth_devs + i, wine_dbgstr_w(dest->caps.szPname), dest->caps.wTechnology,
dest->caps.wVoices, dest->caps.wNotes, dest->caps.wChannelMask, dest->caps.dwSupport, dest->caps.wVoices, dest->caps.wNotes, dest->caps.wChannelMask, (unsigned)dest->caps.dwSupport,
i, wine_dbgstr_w(src->caps.szPname), src->caps.dwSupport); i, wine_dbgstr_w(src->caps.szPname), (unsigned)src->caps.dwSupport);
} }
wrapup: wrapup:
...@@ -1115,7 +1116,7 @@ static UINT midi_out_long_data(WORD dev_id, MIDIHDR *hdr, UINT hdr_size, struct ...@@ -1115,7 +1116,7 @@ static UINT midi_out_long_data(WORD dev_id, MIDIHDR *hdr, UINT hdr_size, struct
if (data[0] != 0xF0 || data[hdr->dwBufferLength - 1] != 0xF7) if (data[0] != 0xF0 || data[hdr->dwBufferLength - 1] != 0xF7)
WARN("The allegedly system exclusive buffer is not correct\n\tPlease report with MIDI file\n"); WARN("The allegedly system exclusive buffer is not correct\n\tPlease report with MIDI file\n");
TRACE("dwBufferLength=%u !\n", hdr->dwBufferLength); TRACE("dwBufferLength=%u !\n", (unsigned)hdr->dwBufferLength);
TRACE(" %02X %02X %02X ... %02X %02X %02X\n", TRACE(" %02X %02X %02X ... %02X %02X %02X\n",
data[0], data[1], data[2], data[hdr->dwBufferLength - 3], data[0], data[1], data[2], data[hdr->dwBufferLength - 3],
data[hdr->dwBufferLength - 2], data[hdr->dwBufferLength - 1]); data[hdr->dwBufferLength - 2], data[hdr->dwBufferLength - 1]);
......
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