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

  1. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!wupost!cs.utexas.edu!tamsun.tamu.edu!tamsun.tamu.edu!news
  2. From: bpb9204@tamsun.tamu.edu (Brent Burton)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Sound Input questions (real time usage)
  5. Date: 14 Dec 1992 00:04:21 -0600
  6. Organization: Texas A&M Univ., Inc.
  7. Lines: 37
  8. Distribution: usa
  9. Message-ID: <1gh855INNj70@tamsun.tamu.edu>
  10. NNTP-Posting-Host: tamsun.tamu.edu
  11.  
  12.  
  13. In short, I'm writing a program to draw the shape of the
  14. sound coming in on the built-in device.  However, I'm new to
  15. using the new Sound Manager and I don't know how to properly
  16. approach it.
  17.  
  18. Think of my program as simply drawing a bar, which has a height
  19. that is proportional to the sound level coming in, like a meter.
  20.  
  21. In IM-6, p 22-95, (talking about the sound parameter blocks), they
  22. say that, "if the bufferPtr field contains NIL, then the count,
  23.   milliseconds, and bufferLength fields are ignored, and the recording
  24.   continues indefinitely until you cal SPBStopRecording.  If bufferPtr is
  25.   NIL, the audio data is not saved anywhere; this feature is useful only
  26.   if you want to do something in your interrupt routine and do not want
  27.   to save the audio data." 
  28.  
  29. It says the data is not saved anywhere, but since I'm not interested in
  30. saving any portion of the input stream (I want the current value only),
  31. is there a location I can look to get the current digitized value?
  32. Do I have to do this through the interrupt routine? 
  33.  
  34. Since my program is effectively a level meter, I just need the current
  35. values.  Another approach I was thinking about was using a small buffer,
  36. like << 100 bytes.  Since the buffer is small, the value contained in
  37. it would be relatively close the the current value.  Is this feasible?
  38.  
  39. Anyway, if you have some ideas, please let me know.
  40.  
  41. thanks,
  42. -Brent
  43.  
  44. -- 
  45. +-------------------------+
  46. | Brent Burton    N5VMG   |    
  47. | bpb9204@tamsun.tamu.edu |  
  48. +-------------------------+ 
  49.