From: Kai Dietrich Newsgroups: comp.os.msdos.djgpp Subject: Re: replace uclock Date: Sun, 17 Dec 2000 18:49:53 +0100 Organization: T-Online Lines: 38 Message-ID: <3A3CFCC1.DE115FD0@t-online.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 977075549 02 25368 QJ7cY6GSDYRzA 001217 17:52:29 X-Complaints-To: abuse AT t-online DOT com X-Sender: 320009961467-0001 AT t-dialin DOT net X-Mailer: Mozilla 4.6 [de]C-CCK-MCD QXW03200 (Win95; I) X-Accept-Language: de,en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi! > > question: Is there any replacment for uclock which > > works also with MIDAS? > > Can you tell what causes uclock to stop working with MIDAS? Perhaps some > workarounds could be suggested. I didn't wrote the library so I don't know why it doesn't work. I only know that it produces some strange frame rates if I call MIDASinit(); . I found something in the MIDAS help but I don't know if it is an answer: "To be able to play music in the background in MS-DOS, and to keep proper tempo with all sound cards, MIDAS needs to use the system timer (IRQ 0, interrupt 8) for music playback. Because of this, user programs may not access the timer directly, as this would cause conflicts with MIDAS music playback. As the system timer is often used for controlling program speed, and running some tasks in the background, MIDAS provides a separate user timer callback for these purposes. This callback should used instead of accessing the timer hardware directly." > As for replacements, please tell what accuracy do you need for time > measurements, and approximately how do you mean to call such a function. > It is next to impossible to give a good advice without knowing these > details. I need an accuracy of about 1-5 ms. The function should be a simple function and should return a time value (like uclock). A working timer callback would be ok, too. I played around with MIDAS MSDOS timer callbacks and it worked, but if the callback rate is to low (<20576 or something like this), sound does some kind of grumbling (framerate is still correct) (callback function is only FrameCounter++;) Bye Kai