Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!thorin!unc!carr From: carr@unc.cs.unc.edu (Michael Carr) Newsgroups: comp.sys.mac.programmer Subject: Sound Manager Keywords: It was working.... Message-ID: <13359@thorin.cs.unc.edu> Date: 10 Apr 90 04:51:44 GMT Sender: news@thorin.cs.unc.edu Lines: 32 Howdy, I'm using the Sound Manager to play a rapid series of 'snd ' resources to simulate the sound of a snare drum being played. I had a program to play a series of sounds in the desired tempo and it worked, but then I added it to a larger application and the timing is now off. I'm using the method : 1) allocate a new sound channel (w/o a synthesizer) 2) play a format 2 'snd ' resource 3) dispose of the channel to play the sounds. The timing is done by checking the TickCount(). Each drumbeat has a set amount of time to play before the next one is played. Everything was working until we took my code and changed it to a procedure within a larger application. Now the timing is off whenever the type of sound to play changes. But we Got all the resources before that and are only changing the handle in SndPlay. We're using Think C and TransSkel. The only things we can think of are internal Mac stuff with memory allocation of the snd resources, or maybe TransSkel messed up something. The resources are preloaded and non-purgeable though. It's frustrating because it worked as a smaller stand-alone program but not as part of the larger application, where it has to. If anyone has any ideas we'd welcome them. Thanks, Mike Carr carr@cs.unc.edu " If I repent anything, it is very likely to be my good behavior. What demon possessed me that I behaved so well?" Henry David Thoreau Mike Carr, expressing his own opinions at: carr@cs.unc.edu