DSound with MIDI (no DMusic) ??
Hi,
Can anyone success using some MIDI sequence functions
with DSound at the same time ??
I have the following MIDI functions :
<form name="form1" >
void PlayMidi(char *song)
{
strcpy(song1,song);
DWORD dwReturn;
mciOpenParms.lpstrDeviceType = "sequencer";
mciOpenParms.lpstrElementName = song;
dwReturn = mciSendCommand(mciOpenParms.wDeviceID,MCI_OPEN,MCI_OPEN_TYPE|MCI_OPEN_ELEMENT,(DWORD)(LPVOID) &mciOpenParms);
mciPlayParms.dwCallback = (unsigned long)GetActiveWindow();
mciSendCommand(mciOpenParms.wDeviceID,MCI_PLAY,MCI_NOTIFY,(DWORD)(LPVOID) &mciPlayParms);
}
void StopMidi(void)
{
mciSendCommand(mciOpenParms.wDeviceID,MCI_STOP,0,(DWORD)(LPVOID) &mciGenericParms);
mciSendCommand(mciOpenParms.wDeviceID,MCI_CLOSE,0,(DWORD)(LPVOID) &mciGenericParms);
}
and I use Lamothe''s game engine, the DSound part, they can play
WAV or MIDI independent but can''t co-exist.....
Sorry, i messed the above post.....but i can't modify it
even i'm logged in....
Edited by - nlo on August 17, 2000 3:50:19 AM
even i'm logged in....
void PlayMidi(char *song){ strcpy(song1,song); DWORD dwReturn; mciOpenParms.lpstrDeviceType = "sequencer"; mciOpenParms.lpstrElementName = song; dwReturn = mciSendCommand(mciOpenParms.wDeviceID,MCI_OPEN,MCI_OPEN_TYPE|MCI_OPEN_ELEMENT,(DWORD)(LPVOID) &mciOpenParms); mciPlayParms.dwCallback = (unsigned long)GetActiveWindow(); mciSendCommand(mciOpenParms.wDeviceID,MCI_PLAY,MCI_NOTIFY,(DWORD)(LPVOID) &mciPlayParms);}void StopMidi(void){ mciSendCommand(mciOpenParms.wDeviceID,MCI_STOP,0,(DWORD)(LPVOID) &mciGenericParms); mciSendCommand(mciOpenParms.wDeviceID,MCI_CLOSE,0,(DWORD)(LPVOID) &mciGenericParms);}
Edited by - nlo on August 17, 2000 3:50:19 AM
do you guys know how to check the status of a midi file (if its playing or not) using mci?
also, CDX (a directx wrapper) seems to be able to mix DSound with mci successfully, so you might want to check out their source code. the homepage is http://www.cdx.sk
also, CDX (a directx wrapper) seems to be able to mix DSound with mci successfully, so you might want to check out their source code. the homepage is http://www.cdx.sk
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement