void LoadSound(WCHAR wstrFileName[20])
{
if (FAILED(G.g_pLoader->LoadObjectFromFile(
CLSID_DirectMusicSegment, // Class identifier.
IID_IDirectMusicSegment8, // ID of desired interface.
wstrFileName, // Filename.
(LPVOID*) &G.g_pSegment))) // Pointer that receives interface.
{
MessageBox( NULL, "Media not found, ",
"DMusic Tutorial", MB_OK );
}
G.g_pSegment->Download(G.g_pPerformance) ;
} // end of LoadSound
I already tried : void LoadSound(WCHAR wstrFileName[20], IDirectMusicSegment8 Segment)
like I did in my LoadBitmap function :
int LoadBitmap(int xDest, int yDest, char *File, LPDIRECTDRAWSURFACE7 surface)
but this doesn''t work
can anyone help me pls
thanx in advance
pass the segment to a function to load a sound
how can I pass a IDirectMusicSegment8 to a function that loads a wave file
I already tried a lot of things but it still doesn''t work?!?
here''s my LoadSound function
You have to pass the OFFSET to the function, not the SEGMENT. In a WAVE-file, everything is organized in 64k blocks.
Kneelz
Kneelz
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement