home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14852 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.6 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!bu.edu!transfer!ceylon!choffman.gte.com!user
  2. From: chuck@gte.com (Chuck Hoffman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Sound Manager Callback
  5. Message-ID: <chuck-010992154806@choffman.gte.com>
  6. Date: 1 Sep 92 19:55:02 GMT
  7. Sender: news@ceylon.gte.com
  8. Followup-To: comp.sys.mac.programmer
  9. Organization: GTE Laboratories
  10. Lines: 24
  11.  
  12. I'm just getting into the Sound Manager and am using the simple note
  13. synthesizer.  I created a sound resource with ResEdit (created my own 'snd
  14. ' template) and the sound plays fine from ResEdit and my program.  Playing
  15. asynchronously.  When the sound is done, I have a CallBackCmd to invoke my
  16. callback routine which simply sets a flag so that I can later dispose of
  17. the channel and release the sound resource.  I've done this by putting the
  18. callback command at the end of the sound resource, and by using
  19. SndDoCommand to insert into the buffer.  In both cases, it works correctly
  20. about 2 of 3 times.  Can't set a THINK C debugger breakpoint in the
  21. callback routine because of crashes (a conflict with the memory manager?),
  22. but the main event loop sees the variable as if it has not been set.  I've
  23. tried code updating the flag (in a global variable) directly, and I've
  24. tried passing the address of the variable to the subroutine and getting at
  25. it that way.  Same symptom no matter what.  Any ideas?
  26.  
  27.  
  28. Chuck Hoffman
  29. chuck@gte.com
  30. GTE Laboratories, Waltham, Massachusetts, USA
  31. (617) 466-2131
  32. =====================================
  33. I'm not sure why we're here, but I am sure that while we're here we're
  34. supposed to help each other.
  35. =====================================
  36.