🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #729

timer device problems

#729
From: Vince Lee
Date: Sat, 05 Aug 1989 22:47
31 lines
1802 bytes
HELP!!!!!!!

I have written an application which uses the timer device and I am getting
TONS of mysterious crashes.

The programs plays sound effects in response to events in the input stream
(key clicks, disk insertion, etc)  The samples are stored in fast RAM, and
instantaneously copied to a chip buffer (which is allocated on the fly) 
before playing.  To de-allocate the buffer, I set up the timer device to 
flag me when I've calculated the sample will have finished playing.  This
all works fine.  The problem occurs when I get, say, another keyclick and
want to override the sample being played.  I simply stop the audio, free the
chip buffers, and call:

  AbortIO(timerRequest);
  WaitIO(timerRequest);

I have tried all combinations of WaitIO/GetMsg/WaitPort.. etc, and every
other way I know of doing the same thing, and yet the addition of this code
causes the program to crash (the whole system to lock up actually) after
about a minute of typing (with a typewriter sample tied to a keystroke).

I have had problems aborting the timer device in a previous program, and 
recall that I never resolved it.  The rest of the timer code consists of 
the timer example code from Commodore (Fish ? #2).

Does the timer device have some bugs I don't know about?

Thanks in advance.

-Vince
Technical Details
Message-ID: <16074@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!ames!pasteur!cory.Berkeley.EDU!johnhlee

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!ames!pasteur!cory.Berkeley.EDU!johnhlee
From: johnhlee@cory.Berkeley.EDU (Vince Lee)
Newsgroups: comp.sys.amiga.tech
Subject: timer device problems
Message-ID: <16074@pasteur.Berkeley.EDU>
Date: 5 Aug 89 22:47:49 GMT
Sender: news@pasteur.Berkeley.EDU
Reply-To: johnhlee@cory.Berkeley.EDU.UUCP (Vince Lee)
Distribution: comp
Organization: University of California, Berkeley
Lines: 31