Mail Archives: djgpp/1997/12/22/20:17:00
Jason Eastham wrote in message <349EB8ED DOT DCC54887 AT inlink DOT com>...
>Hello,
>
> I am making a program using DJGPP and Allegro to play MIDIs while
>displaying a Christmas pic. My problem is that I cannot figure out how
>to check for a keypress while the MIDI is playing. All the attempts
>that I have made have either not read any input at all, or made a
>repeating drum-like sound in the background. A copy of my code is
>below.
>
>
You have a do-nothing loop who's test is to see if the MIDI is done playing.
while (midipos != -1)
{
}
Why not make it something like this?
while (midipos!= -1)
{
if (keypressed())
break;
}
And one thing - if your code is to be given around, considder appending the
files to the EXE, and having install_sound() autodetect the card. If you won't
be using sound, don't give it a digital card. Anyway...
and another
crt0.o references crt1.o, and it references main(), which no library has. Oh
dear...
- Raw text -