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