delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/24/17:36:32

Message-ID: <19980424213606.2464.qmail@hotmail.com>
From: "Peter Soltesz" <soltesz AT hotmail DOT com>
To: rosenberger AT berlin DOT snafu DOT de
Cc: djgpp AT delorie DOT com
Subject: Re: MIDI slowed down
Date: Fri, 24 Apr 1998 14:36:03 PDT

HI !

Dont use the timer to move `em ! Because, when it is drawing, the
MIDI timer callback cannot occour. 

Use just a simple timer routin:
CALLBACK timerproc(void) {
 timer++;
 };

And move the buttons, in the main program ! Check timer every time.
like this:

While(!kbhit()) {
 while(timer>0) {
  timer--;
  movethem();
  };
 if (timer>=0) {
  drawthem();
  };
 };

Good luck !

Archee/CoNTRACT

ps: I subscribed to the list today, I write to here first time.

>
>I made an interface using one fullscreen bitmap (800, 600).
>And I added three buttons (125, 75). They are moved with one timer at 
the
>same time. But when the midi is playing and you push on these buttons 
and
>they move the midi is slowed down, drastically.
>How can I make it working?
>It can't be my CPU, because I have a P233MMX with 64Mb Ram.
>
>mal me at:
>rosenberger AT snafu DOT de
>
>
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019