can anyone give me an example of how to set up sounds in allegro to play a midi file, i've been trying for about an hour now.
Thanks
Shakespeare
can anyone give me an example of how to set up sounds in allegro to play a midi file, i've been trying for about an hour now.
Thanks
Shakespeare
Did you read the manual? Check out the 'Sound init routines' and 'MIDI music routines' section.
gcc -lalleg
http://www.ciusa.net/~jrgrant/
I normally wouldn't do this, but, I'm in a good mood.
Code:/* Set up the sound to use digital SFX autodetected, MIDI autodetected, and the 0 is just for compatablilty issues. */ install_sound(DIGI_AUTODETECT,MIDI_AUTODETECT,0); ... /* Play sound effect, first argument is the sound file to play, and the second determines if it is looping */ PlaySound(SOUND_EFFECT, false); /* Play MIDI, first argument is the MIDI file to play, and second detemines if it loops */ PlayMIDI(MIDI_MUSIC, true);