Commit 301b8679 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dmime: Remove unneeded casts.

parent e6431cd0
......@@ -142,7 +142,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
This->pToolGraph = (IDirectMusicGraph*) pGraph;
}
*ppObject = (LPDIRECTMUSICGRAPH) This->pToolGraph;
*ppObject = This->pToolGraph;
IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) *ppObject);
return S_OK;
}
......@@ -158,7 +158,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
case DMUS_PATH_PERFORMANCE:
{
/* TODO check wanted GUID */
*ppObject = (LPDIRECTMUSICPERFORMANCE8) This->pPerf;
*ppObject = This->pPerf;
IUnknown_AddRef((LPUNKNOWN) *ppObject);
return S_OK;
}
......@@ -167,16 +167,16 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
case DMUS_PATH_PERFORMANCE_GRAPH:
{
IDirectMusicGraph* pPerfoGraph = NULL;
IDirectMusicPerformance8_GetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, &pPerfoGraph);
IDirectMusicPerformance8_GetGraph(This->pPerf, &pPerfoGraph);
if (NULL == pPerfoGraph) {
IDirectMusicGraphImpl* pGraph = NULL;
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
IDirectMusicPerformance8_SetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, (IDirectMusicGraph*) pGraph);
IDirectMusicPerformance8_SetGraph(This->pPerf, (IDirectMusicGraph*) pGraph);
/* we need release as SetGraph do an AddRef */
IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) pGraph);
pPerfoGraph = (LPDIRECTMUSICGRAPH) pGraph;
}
*ppObject = (LPDIRECTMUSICGRAPH) pPerfoGraph;
*ppObject = pPerfoGraph;
return S_OK;
}
break;
......
......@@ -219,8 +219,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC
}
if (NULL != pDirectSound) {
This->pDirectSound = (IDirectSound*) pDirectSound;
IDirectSound_AddRef((LPDIRECTSOUND) This->pDirectSound);
This->pDirectSound = pDirectSound;
IDirectSound_AddRef(This->pDirectSound);
} else {
HRESULT hr;
hr = DirectSoundCreate8(NULL, (LPDIRECTSOUND8*) &This->pDirectSound, NULL);
......@@ -242,7 +242,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC
if (NULL != ppDirectMusic && NULL != *ppDirectMusic) {
/* app creates it's own dmusic object and gives it to performance */
This->pDirectMusic = (IDirectMusic8*) *ppDirectMusic;
IDirectMusic8_AddRef((LPDIRECTMUSIC8) This->pDirectMusic);
IDirectMusic8_AddRef(This->pDirectMusic);
} else {
/* app allows the performance to initialise itfself and needs a pointer to object*/
CoCreateInstance (&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, (void**)&This->pDirectMusic);
......@@ -451,8 +451,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_GetGraph (LPDIRECTMUSICPERFOR
IDirectMusicPerformance8Impl *This = (IDirectMusicPerformance8Impl *)iface;
FIXME("(%p, %p): to check\n", This, ppGraph);
if (NULL != This->pToolGraph) {
*ppGraph = (LPDIRECTMUSICGRAPH) This->pToolGraph;
IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) *ppGraph);
*ppGraph = This->pToolGraph;
IDirectMusicGraph_AddRef(*ppGraph);
} else {
return E_FAIL;
}
......@@ -466,11 +466,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_SetGraph (LPDIRECTMUSICPERFOR
if (NULL != This->pToolGraph) {
/* Todo clean buffers and tools before */
IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) This->pToolGraph);
IDirectMusicGraph_Release(This->pToolGraph);
}
This->pToolGraph = pGraph;
if (NULL != This->pToolGraph) {
IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) This->pToolGraph);
IDirectMusicGraph_AddRef(This->pToolGraph);
}
return S_OK;
}
......@@ -690,11 +690,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown (LPDIRECTMUSICPERFO
CloseHandle(This->procThread);
}
if (NULL != This->pDirectSound) {
IDirectSound_Release((LPDIRECTSOUND) This->pDirectSound);
IDirectSound_Release(This->pDirectSound);
This->pDirectSound = NULL;
}
if (NULL != This->pDirectMusic) {
IDirectMusic8_Release((LPDIRECTMUSIC8) This->pDirectMusic);
IDirectMusic8_Release(This->pDirectMusic);
This->pDirectMusic = NULL;
}
return S_OK;
......@@ -785,7 +785,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio (LPDIRECTMUSICPERFO
This->pParams.dwFeatures = dwFlags;
This->pParams.clsidDefaultSynth = CLSID_DirectMusicSynthSink;
}
hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, (IDirectMusicAudioPath**) &This->pDefaultPath);
hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, &This->pDefaultPath);
PostMessageToProcessMsgThread(This, PROCESSMSG_START);
......@@ -829,7 +829,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath (LPDIRECTMUSI
/** TODO */
*ppNewPath = (LPDIRECTMUSICAUDIOPATH) pPath;
*ppNewPath = pPath;
return IDirectMusicAudioPath_Activate(*ppNewPath, fActivate);
}
......@@ -921,7 +921,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath (LPDI
}
default_path->pPrimary = buffer;
*ppNewPath = (LPDIRECTMUSICAUDIOPATH) pPath;
*ppNewPath = pPath;
TRACE(" returning IDirectMusicPerformance interface at %p.\n", *ppNewPath);
......@@ -933,13 +933,13 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_SetDefaultAudioPath (LPDIRECT
FIXME("(%p, %p): semi-stub\n", This, pAudioPath);
if (NULL != This->pDefaultPath) {
IDirectMusicAudioPath_Release((LPDIRECTMUSICAUDIOPATH) This->pDefaultPath);
IDirectMusicAudioPath_Release(This->pDefaultPath);
((IDirectMusicAudioPathImpl*) This->pDefaultPath)->pPerf = NULL;
This->pDefaultPath = NULL;
}
This->pDefaultPath = pAudioPath;
if (NULL != This->pDefaultPath) {
IDirectMusicAudioPath_AddRef((LPDIRECTMUSICAUDIOPATH) This->pDefaultPath);
IDirectMusicAudioPath_AddRef(This->pDefaultPath);
((IDirectMusicAudioPathImpl*) This->pDefaultPath)->pPerf = (IDirectMusicPerformance8*) This;
}
......@@ -952,7 +952,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_GetDefaultAudioPath (LPDIRECT
FIXME("(%p, %p): semi-stub (%p)\n", This, ppAudioPath, This->pDefaultPath);
if (NULL != This->pDefaultPath) {
*ppAudioPath = (LPDIRECTMUSICAUDIOPATH) This->pDefaultPath;
*ppAudioPath = This->pDefaultPath;
IDirectMusicAudioPath_AddRef(*ppAudioPath);
} else {
*ppAudioPath = NULL;
......
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