Board index » delphi » Playing MIDI files from memory

Playing MIDI files from memory


2003-08-18 02:32:51 PM
delphi113
In my program I have to deal with a number of MIDI files and play them. The
MIDI files are stored in memory streams though. At the moment I first save
them to a file and then use the Media Player component to play them but this
results in a clear interuption because of the saving and loading of the
files.
So here is my question: How do I play MIDI files directy from a memory
stream. Can I use the mediaplayer component for this, or the MCI interface,
or do I have to do something else? (I do not want to use anything based on
DirectX version higher than 6 because of other compatibility issues, so e.g.
no DirectMusic at the moment.)
Help would be very much appreciated.
Mark Overmars
 
 

Re:Playing MIDI files from memory

"Mark Overmars" <XXXX@XXXXX.COM>writes
XXXX@XXXXX.COM...
Quote
So here is my question: How do I play MIDI files directy from a memory
stream. Can I use the mediaplayer component for this, or the MCI
interface, or do I have to do something else?
Use the low-level MIDI API functions in mmsystem.dll
ms-help://MS.PSDK.1033/multimed/midi_1wv3.htm
www.microsoft.com/msdownload/platformsdk/sdkupdate
Cheers,
Ignacio