Mail Archives: djgpp/1997/11/20/02:01:32
Mike McLean wrote:
>
> I'm using the WIP Nov 16th version of allegro and I am trying to play a
> midi file, the source compiles fine, but I don't get the file to play.
> I've never tried to play midi with any version of allegro before.
> Please help me out, and tell me what mistake(s) I am making. I'm trying
> to better myself at programming.
>
> Here is the code:
>
> #include <allegro.h>
> #include <iostream.h>
iostream.h isn't needed for Allegro
> int main(void)
> {
MIDI *MissionHandler; /* need to keep track of resources */
allegro_init(); /* must initialize Allegro first */
> load_midi("mission.mid");
MissionHandler = load_midi("mission.mid"); /*delete above line, use
this */
> play_midi(load_midi("mission.mid"),1);
play_midi(MissionHandler,1); /* Delete above line, use this */
> }
Untested code, but should work.
- Raw text -