From: "Tony O'Bryan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Playing Midi in allegro Date: Wed, 19 Nov 1997 19:46:04 -0600 Organization: Southwest Missouri State University Lines: 34 Message-ID: <3473965C.6DA9@nic.smsu.edu> References: <34738705 DOT 1F8CB3B4 AT primenet DOT com> Reply-To: aho450s AT nic DOT smsu DOT edu NNTP-Posting-Host: jim.a49.smsu.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 > #include 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.