Using a Callback Function to Manage Buffered Playback

You can define your own callback function to manage buffered playback of MIDI output devices. The callback function is documented as MidiOutProc.

The following messages can be sent to the wMsg parameter of the MidiOutProc callback function.

Sent when the device is closed by using the midiOutClose function.
Sent when the device driver is finished with a data block sent by using the midiOutLongMsg or midiStreamOut function.
Sent when the device is opened by using the midiOutOpen function.

These messages are similar to those sent to window procedure functions, but the parameters are different. A handle of the open MIDI device is passed as a parameter to the callback function, along with the doubleword of instance data passed by using midiOutOpen.

After the driver is finished with a data block, you can clean up and free the data block. Because of the suggested restrictions on callback functions, it is better not to do this from within the callback function.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database