home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17352 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  3.6 KB

  1. Xref: sparky comp.sys.amiga.programmer:17352 comp.sys.amiga.audio:4356 comp.sys.amiga.hardware:21482
  2. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.audio,comp.sys.amiga.hardware
  3. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!jazz
  4. From: jazz@netcom.com (David C. Navas)
  5. Subject: Re: Audio HARDWARE bug?
  6. Message-ID: <1992Dec14.204123.25129@netcom.com>
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. References: <1992Dec14.032539.7219@netcom.com> <Bz9Arr.5vF@cck.coventry.ac.uk>
  9. Date: Mon, 14 Dec 1992 20:41:23 GMT
  10. Lines: 69
  11.  
  12. In article <Bz9Arr.5vF@cck.coventry.ac.uk> csg019@cch.coventry.ac.uk (-~=Zaphod=~-) writes:
  13. >I had this problem for some time, the sound system generates interupts
  14. >WHEN THE DMA REGISTERS HAVE BEEN LOADED. *Not when a sample finishes.
  15. >Apparently they are copied to hidden  backup registers.
  16.  
  17. Yep, this I know.
  18.  
  19. >The way to tell if your samples has finished is to load a zero length sample
  20. >after loading the address of the first sample.
  21.  
  22. I've actually been loading a four-byte length sample -- is it legal to load a
  23. zero length sample?  Hmm, interesting idea....  Loading a 2byte sample, oddly
  24. enough, gave me VERY BAD results....  Probably too many interrupts (I replayed
  25. this sample endlessly -- if I had gotten the stuff I'm about to explain
  26. working, I would have just poked the output and left it at that....).
  27. Missing interrupts is bad for my state machine....
  28.  
  29. OKAY.  Let's try this again.  I absolutely, positively want to be interrupted
  30. when my sample starts.  I've designed my state machine to anticipate it....
  31. Audio state preconditions:  dma off, interrupts off.  I won't guarantee
  32. how long they've been off, but they are off.  The rest of the state is the
  33. same as whatever state audio.device leaves the audio in when the channel
  34. is allocated.  BTW -- I've installed my own interrupt routine as well, of
  35. course.
  36.  
  37. load data ptr, length, period, volume.
  38. Turn interrupts on.
  39. Clear intreq of audio intreqs (just in case!)
  40. Turn dma on.
  41.  
  42. SUBSEQUENT to dma being turned on AND before the VPrintf that immediately
  43. follows the instruction I receive two interrupts. -sometimes-.  If I clear
  44. the intreq at the END of my interrupt routine instead of the beginning it's
  45. about 1 out of 9.  Otherwise it's about 1 out of three.
  46.  
  47. I can Delay() as long as you'd like before turning dma back on (I tried half
  48. a second, which seems long enough to me!) without effecting the problem.
  49.  
  50. So far I've gotten the following email:
  51.     1) Audio is hosed (2)
  52.     2) There's nothing wrong with the audio (1)
  53.     3) You're supposed to receive two interrupts -- one at the start
  54.         one at the end (1)
  55.  
  56. I remain confused why it is when I poke one bloody register I get two
  57. bloody interrupts....  It seems a number of other people could use some
  58. real expert advice on the audio hardware as well.  Oh Mike Sinz!?!
  59.  
  60. BTW -- whoever designed the audio h/w shutdown/restart stuff should be shot.
  61. My opinion :)
  62.  
  63. >This drove me crazy for about 3 months, before someone at Argonought
  64. >software told me how to do it.
  65.  
  66. I've got until Jan. 26th to get something to work.  Preferrably I'd like
  67. to be writing other modules and solving some other conflicts as well
  68. (DICE vs. SASC 6.x)
  69.  
  70. >****\\\X//********Steven Haggerty**csg019@uk.ac.cov.cck ok?*****\\\X//*********
  71.  
  72. Thanks for responding, however.  Hopefully this will lead to a public
  73. discussion about the audio hardware, which, to my limited knowledge, hasn't
  74. happened yet -- at least, it's different from the RTG discussions that are
  75. going on ;)
  76.  
  77. -- 
  78. David Navas                                       jazz@netcom.com
  79.                         dnavas@oracle.com
  80. "If it wasn't for the fact that I worked so hard, I'd be a very lazy person."
  81.