I have created a function that is supposed to load a *.wav file usig DirectMusic. But the function doesnt pass WCHAR* szWAV corectly. szWAV is suposed to be the filename of my *.wav file...
The program runs without errors but the sound doesn't work.
Why doesn't the soundfile load? When I am not using the function it works fine...?!?!
void LoadSoundFile(IDirectMusicPerformance8 * PERFORMANCE, IDirectMusicSegment8 * SEGMENT, WCHAR* szWAV)
IID_IDirectMusicSegment8, szWAV, (void **) &SEGMENT);
DMUS_SEG_ALLTRACKS, 0, NULL);
How I'm using the function:
//DirectSound stuff needed...
IDirectMusicPerformance8 * Sound = NULL;
IDirectMusicSegment8 * Gun = NULL;
//Calling the funtion...
LoadSoundFile(Gun, GunSound, L"Gun.wav");
I didnt know where to post this question but I hope someone could help me out.
Thanks for your help //Aram