Improving the Performance of MCI Wave PlaybackID: Q77700
|
This article discusses two methods to improve playback performance for a series of MCI wave files in an application developed for the Microsoft Windows environment.
The following code fragment demonstrates opening the device and wave
file at the same time. This method does not give the best performance.
mciopen.lpstrDeviceType = (LPSTR)"waveaudio";
mciopen.lpstrElementName = (LPSTR)lpWavefile;
// The following two fields must be initialized or the debugging
// version of MMSYSTEM will cause an unrecoverable application
// error (UAE).
mciopen.lpstrDeviceType = "\0";
mciopen.lpstrAlias = "\0";
dwFlags = MCI_OPEN_TYPE | MCI_OPEN_ELEMENT;
dwRes = mciSendCommand(0, MCI_OPEN, dwFlags,
(DWORD)(LPSTR)&mciopen);
// Open the waveaudio driver separate from the element.
mciopen.lpstrDeviceType = (LPSTR)MCI_DEVTYPE_WAVEFORM_AUDIO;
dwFlags = MCI_OPEN_TYPE;
dwRes = mciSendCommand(0, MCI_OPEN, dwFlags,
(DWORD)(LPSTR)&mciopen);
dwFlags = MCI_OPEN_ELEMENT;
mciopen.lpstrElementName = (LPSTR)lpWaveName;
dwRes = mciSendCommand(wGlobalDeviceID, MCI_OPEN, dwFlags,
(DWORD)(LPSTR)&mciopen);
Additional query words: 3.10 3.50 4.00 95 win16sdk
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 4, 1999