Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!REEKES@applelink.apple.com From: REEKES@applelink.apple.com (Jim Reekes) Newsgroups: comp.sys.mac.programmer Subject: Re: Simultaneous Sampled Sounds w/ System 7 Message-ID: <13295@goofy.Apple.COM> Date: 2 May 91 19:49:58 GMT References: <8c7M7sW00WBNE1N7Fv@andrew.cmu.edu> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 38 In article <8c7M7sW00WBNE1N7Fv@andrew.cmu.edu>, jp57+@andrew.cmu.edu (Jefferson Provost) writes: > > > > Hi, > > Have any of you had any success with getting two sampled sounds to be > mixed and played together with system 7.0? > > The new Sound Manager docs claim that the new sound manager has the > ability to play multiple channels of sampled sound simultaneously, but I > can't seem to get it to work. I allocate a channel and play a sound, > and then, while it is still playing, I allocate another channel and play > another sound, but the second channel seems to overide the first channel > and the first sound gets cut off. I'm playing the sounds with > SndPlayDoubleBuffer() (I need low level control), and I've tried various > initializations for the sound channels (initSRate22k, initNoSRC). I've > also tried the first sound in the right stereo channel and the second > sound in the left stereo channel with the same result. The sound manager does support multiple channels of sampled sounds on all Macs running System 6.0.7 or later, except for the Plus, SE, and Classic. I'm probably going to start a controversy with this, but I don't think you should use SndPlayDoubleBuffer. It was written to support playing sound from disk. If you have something that is very similar, then SndPlayDoubleBuffer might work out for you. Otherwise, I recommend just using bufferCmds. The limitations of SndPlayDoubleBuffer make it less than you might expect. It's no more "low level" than a bufferCmd. One thing SndPlayDoubleBuffer cannot handle is different sample rates. Once you start a sound, you have to stick with that sample rate. If you just sent a set of bufferCmds, this would not be a limitation. Also, the only init param that makes a difference is initNoInterp. All of the other params are overridden by the bufferCmd you send. Jim Reekes E.O., Macintosh Toolbox Engineering