Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!ndcheg!ndmath!milo From: milo@ndmath.UUCP (Greg Corson) Newsgroups: comp.sys.mac.programmer Subject: SoundPlay in Async mode Message-ID: <1354@ndmath.UUCP> Date: 8 Apr 89 16:23:06 GMT Organization: Math. Dept., Univ. of Notre Dame Lines: 24 Would anyone happen to have a code fragment that illustrates how to setup the required callback routines so you can have SoundPlay play a sound in the background (async) mode? The documentation I have (the revised IM chapter) isn't clear at all on how to do this. I'm working on a game and have to play sounds like gunshots, screams...etc without interrupting the screen animation. I need to know the proper way to 1. open the channel and specify a callback 2. play a snd resource 3. have the callback set a global flag 4. have my main event loop close the channel when the flag is set. Thanks! Greg Corson 19141 Summers Drive South Bend, IN 46637 (219) 277-5306 {pur-ee,rutgers,uunet}!iuvax!ndmath!milo