Commit c0a9281c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wineoss.drv: Remove superfluous pointer casts.

parent e01ae46c
...@@ -161,7 +161,7 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QueryInterface( ...@@ -161,7 +161,7 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QueryInterface(
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) { IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) {
IDsDriverPropertySet_AddRef(iface); IDsDriverPropertySet_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
...@@ -395,7 +395,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( ...@@ -395,7 +395,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsCaptureDriverBuffer) ) { IsEqualGUID(riid, &IID_IDsCaptureDriverBuffer) ) {
IDsCaptureDriverBuffer_AddRef(iface); IDsCaptureDriverBuffer_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
...@@ -404,7 +404,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( ...@@ -404,7 +404,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(
IDsCaptureDriverNotifyImpl_Create(This, &(This->notify)); IDsCaptureDriverNotifyImpl_Create(This, &(This->notify));
if (This->notify) { if (This->notify) {
IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify); IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify);
*ppobj = (LPVOID)This->notify; *ppobj = This->notify;
return DS_OK; return DS_OK;
} }
return E_FAIL; return E_FAIL;
...@@ -415,7 +415,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface( ...@@ -415,7 +415,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(
IDsCaptureDriverPropertySetImpl_Create(This, &(This->property_set)); IDsCaptureDriverPropertySetImpl_Create(This, &(This->property_set));
if (This->property_set) { if (This->property_set) {
IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set); IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set);
*ppobj = (LPVOID)This->property_set; *ppobj = This->property_set;
return DS_OK; return DS_OK;
} }
return E_FAIL; return E_FAIL;
...@@ -721,7 +721,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface( ...@@ -721,7 +721,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface(
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsCaptureDriver) ) { IsEqualGUID(riid, &IID_IDsCaptureDriver) ) {
IDsCaptureDriver_AddRef(iface); IDsCaptureDriver_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
...@@ -859,7 +859,7 @@ static void * my_memcpy(void * dst, const void * src, int length) ...@@ -859,7 +859,7 @@ static void * my_memcpy(void * dst, const void * src, int length)
static DWORD CALLBACK DSCDB_Thread(LPVOID lpParameter) static DWORD CALLBACK DSCDB_Thread(LPVOID lpParameter)
{ {
IDsCaptureDriverBufferImpl *This = (IDsCaptureDriverBufferImpl *)lpParameter; IDsCaptureDriverBufferImpl *This = lpParameter;
struct pollfd poll_list[2]; struct pollfd poll_list[2];
int retval; int retval;
DWORD offset = 0; DWORD offset = 0;
...@@ -1212,7 +1212,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer( ...@@ -1212,7 +1212,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(
(*ippdscdb)->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL); (*ippdscdb)->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
(*ippdscdb)->hExitEvent = CreateEventW(NULL, FALSE, FALSE, NULL); (*ippdscdb)->hExitEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
(*ippdscdb)->hThread = CreateThread(NULL, 0, DSCDB_Thread, (LPVOID)(*ippdscdb), 0, &((*ippdscdb)->dwThreadID)); (*ippdscdb)->hThread = CreateThread(NULL, 0, DSCDB_Thread, *ippdscdb, 0, &((*ippdscdb)->dwThreadID));
WaitForSingleObject((*ippdscdb)->hStartUpEvent, INFINITE); WaitForSingleObject((*ippdscdb)->hStartUpEvent, INFINITE);
CloseHandle((*ippdscdb)->hStartUpEvent); CloseHandle((*ippdscdb)->hStartUpEvent);
(*ippdscdb)->hStartUpEvent = INVALID_HANDLE_VALUE; (*ippdscdb)->hStartUpEvent = INVALID_HANDLE_VALUE;
......
...@@ -155,7 +155,7 @@ static HRESULT WINAPI IDsDriverPropertySetImpl_QueryInterface( ...@@ -155,7 +155,7 @@ static HRESULT WINAPI IDsDriverPropertySetImpl_QueryInterface(
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) { IsEqualGUID(riid, &IID_IDsDriverPropertySet) ) {
IDsDriverPropertySet_AddRef(iface); IDsDriverPropertySet_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
...@@ -403,7 +403,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, ...@@ -403,7 +403,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface,
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsDriverBuffer) ) { IsEqualGUID(riid, &IID_IDsDriverBuffer) ) {
IDsDriverBuffer_AddRef(iface); IDsDriverBuffer_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
...@@ -412,7 +412,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, ...@@ -412,7 +412,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface,
IDsDriverNotifyImpl_Create(This, &(This->notify)); IDsDriverNotifyImpl_Create(This, &(This->notify));
if (This->notify) { if (This->notify) {
IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify); IDsDriverNotify_AddRef((PIDSDRIVERNOTIFY)This->notify);
*ppobj = (LPVOID)This->notify; *ppobj = This->notify;
return DS_OK; return DS_OK;
} }
*ppobj = 0; *ppobj = 0;
...@@ -424,7 +424,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface, ...@@ -424,7 +424,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_QueryInterface(PIDSDRIVERBUFFER iface,
IDsDriverPropertySetImpl_Create(This, &(This->property_set)); IDsDriverPropertySetImpl_Create(This, &(This->property_set));
if (This->property_set) { if (This->property_set) {
IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set); IDsDriverPropertySet_AddRef((PIDSDRIVERPROPERTYSET)This->property_set);
*ppobj = (LPVOID)This->property_set; *ppobj = This->property_set;
return DS_OK; return DS_OK;
} }
*ppobj = 0; *ppobj = 0;
...@@ -668,7 +668,7 @@ static HRESULT WINAPI IDsDriverImpl_QueryInterface(PIDSDRIVER iface, REFIID riid ...@@ -668,7 +668,7 @@ static HRESULT WINAPI IDsDriverImpl_QueryInterface(PIDSDRIVER iface, REFIID riid
if ( IsEqualGUID(riid, &IID_IUnknown) || if ( IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDsDriver) ) { IsEqualGUID(riid, &IID_IDsDriver) ) {
IDsDriver_AddRef(iface); IDsDriver_AddRef(iface);
*ppobj = (LPVOID)This; *ppobj = This;
return DS_OK; return DS_OK;
} }
......
...@@ -1025,7 +1025,7 @@ static int modFMLoad(int dev) ...@@ -1025,7 +1025,7 @@ static int modFMLoad(int dev)
sbi.channel = i; sbi.channel = i;
memcpy(sbi.operators, midiFMInstrumentPatches + i * 16, 16); memcpy(sbi.operators, midiFMInstrumentPatches + i * 16, 16);
if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) { if (write(midiSeqFD, &sbi, sizeof(sbi)) == -1) {
WARN("Couldn't write patch for instrument %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno)); WARN("Couldn't write patch for instrument %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno));
return -1; return -1;
} }
...@@ -1034,7 +1034,7 @@ static int modFMLoad(int dev) ...@@ -1034,7 +1034,7 @@ static int modFMLoad(int dev)
sbi.channel = 128 + i; sbi.channel = 128 + i;
memcpy(sbi.operators, midiFMDrumsPatches + i * 16, 16); memcpy(sbi.operators, midiFMDrumsPatches + i * 16, 16);
if (write(midiSeqFD, (char*)&sbi, sizeof(sbi)) == -1) { if (write(midiSeqFD, &sbi, sizeof(sbi)) == -1) {
WARN("Couldn't write patch for drum %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno)); WARN("Couldn't write patch for drum %d, errno %d (%s)!\n", sbi.channel, errno, strerror(errno));
return -1; return -1;
} }
...@@ -1047,7 +1047,7 @@ static int modFMLoad(int dev) ...@@ -1047,7 +1047,7 @@ static int modFMLoad(int dev)
*/ */
static void modFMReset(WORD wDevID) static void modFMReset(WORD wDevID)
{ {
sFMextra* extra = (sFMextra*)MidiOutDev[wDevID].lpExtra; sFMextra* extra = MidiOutDev[wDevID].lpExtra;
sVoice* voice = extra->voice; sVoice* voice = extra->voice;
sChannel* channel = extra->channel; sChannel* channel = extra->channel;
int i; int i;
...@@ -1252,7 +1252,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam) ...@@ -1252,7 +1252,7 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
* - chorus depth controller is not used * - chorus depth controller is not used
*/ */
{ {
sFMextra* extra = (sFMextra*)MidiOutDev[wDevID].lpExtra; sFMextra* extra = MidiOutDev[wDevID].lpExtra;
sVoice* voice = extra->voice; sVoice* voice = extra->voice;
sChannel* channel = extra->channel; sChannel* channel = extra->channel;
int chn = (evt & 0x0F); int chn = (evt & 0x0F);
......
...@@ -1107,7 +1107,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1107,7 +1107,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
getControlType(mix->ctrl[c].ctrl.dwControlType), getControlType(mix->ctrl[c].ctrl.dwControlType),
lpmcd->cChannels); lpmcd->cChannels);
mcdu = (LPMIXERCONTROLDETAILS_UNSIGNED)lpmcd->paDetails; mcdu = lpmcd->paDetails;
/* return value is 00RL (4 bytes)... */ /* return value is 00RL (4 bytes)... */
if ((val = mix->volume[chnl]) == -1 && if ((val = mix->volume[chnl]) == -1 &&
...@@ -1155,7 +1155,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1155,7 +1155,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
lpmcd->cChannels); lpmcd->cChannels);
/* we mute both channels at the same time */ /* we mute both channels at the same time */
mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; mcdb = lpmcd->paDetails;
mcdb->fValue = (mix->volume[chnl] != -1); mcdb->fValue = (mix->volume[chnl] != -1);
TRACE("=> %s\n", mcdb->fValue ? "on" : "off"); TRACE("=> %s\n", mcdb->fValue ? "on" : "off");
} }
...@@ -1188,7 +1188,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1188,7 +1188,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
int i, j; int i, j;
/* we mute both channels at the same time */ /* we mute both channels at the same time */
mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; mcdb = lpmcd->paDetails;
for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++)
{ {
...@@ -1229,7 +1229,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1229,7 +1229,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
LPMIXERCONTROLDETAILS_LISTTEXTW mcdlt; LPMIXERCONTROLDETAILS_LISTTEXTW mcdlt;
int i, j; int i, j;
mcdlt = (LPMIXERCONTROLDETAILS_LISTTEXTW)lpmcd->paDetails; mcdlt = lpmcd->paDetails;
for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++)
{ {
if (WINE_CHN_SUPPORTS(mix->recMask, j)) if (WINE_CHN_SUPPORTS(mix->recMask, j))
...@@ -1308,7 +1308,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1308,7 +1308,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
getControlType(mix->ctrl[c].ctrl.dwControlType), getControlType(mix->ctrl[c].ctrl.dwControlType),
lpmcd->cChannels); lpmcd->cChannels);
mcdu = (LPMIXERCONTROLDETAILS_UNSIGNED)lpmcd->paDetails; mcdu = lpmcd->paDetails;
/* val should contain 00RL */ /* val should contain 00RL */
switch (lpmcd->cChannels) switch (lpmcd->cChannels)
{ {
...@@ -1360,7 +1360,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1360,7 +1360,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
getControlType(mix->ctrl[c].ctrl.dwControlType), getControlType(mix->ctrl[c].ctrl.dwControlType),
lpmcd->cChannels); lpmcd->cChannels);
mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; mcdb = lpmcd->paDetails;
if (mcdb->fValue) if (mcdb->fValue)
{ {
/* save the volume and then set it to 0 */ /* save the volume and then set it to 0 */
...@@ -1405,7 +1405,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, ...@@ -1405,7 +1405,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
lpmcd->cChannels); lpmcd->cChannels);
/* we mute both channels at the same time */ /* we mute both channels at the same time */
mcdb = (LPMIXERCONTROLDETAILS_BOOLEAN)lpmcd->paDetails; mcdb = lpmcd->paDetails;
mask = 0; mask = 0;
for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++) for (i = j = 0; j < SOUND_MIXER_NRDEVICES; j++)
{ {
......
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