Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!Apple.COM!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: SoundPlay in Async mode Message-ID: <1266@internal.Apple.COM> Date: 10 Apr 89 19:46:33 GMT References: <1354@ndmath.UUCP> Sender: usenet@Apple.COM Organization: Objects-R-Us, Apple Computer, Inc. Lines: 21 The Info-Mac archives should have an MPW Pascal unit that I wrote, which implements asynchronous SndPlay. The main things to keep in mind: (1) You have to create a private sound channel. You should dispose of this channel as soon as you are done with it, otherwise no other program can make a sound. (2) You use the channel call back feature to find out when the sound is finished. (3) You have to lock down the snd resource before playing it. The Sound Manager locks the resource for the duration of the SndPlay call, but when playing asynchronous sounds, this is a trivial length of time. The unit I wrote does all of this stuff. Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1