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