After you finish using an MCI device, you must use the MCI_CLOSE command to close the device. If you are playing a compound device, such as a waveform or MIDI device, and want to play a different device element using the same device, close the device and reopen it using the new device element.
Note:
If you're playing multiple device elements with the same device, you'll get better performance if you open the device by explictly specifying its type and then open, play, and close the individual device elements separately. Don't close the device until you are through playing all of the device elements. Otherwise, the driver will be reloaded each time you open the device.