#include MIDI *midi; // Instance to store our MIDI data. int main() { allegro_init(); install_keyboard(); set_color_depth(16); // Adjust if necessary. set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); // Windowed because it won't matter. detect_midi_driver(MIDI_AUTODETECT); detect_digi_driver(DIGI_AUTODETECT); // Don't know if this is necessary if you only want midi. install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL); midi = load_midi("ff1menu.mid"); play_midi(midi, 1); readkey(); // Wait until a key is pressed before we... // ... End the program. stop_midi(); destroy_midi(midi); // It is necessary to free memory allocated for creating the MIDI to prevent any memory leaks. // It isn't necessary to un-init Allegro since it does so for us. return 0; } END_OF_MAIN();