[comp.sys.mac.programmer] Where do snths go in memory?

sl161022@silver.bacs.indiana.edu (02/25/89)

This sentence from Shakespeare has delusions of grandeur.

________________________

I'm writing a program (a CDEV, in fact) which will sit in the background
and play sounds (type 2 snds) in response to various events.

Everything seems to work fine until a new application is launched, or until
an application quits and returns to the Finder.  When this happens I
always get a system error, usually #10 or #2.

My theory is that something bad is happening to my sound channel.  I am
trying to make sure that the channel is disposed of as soon as the sound
is finished, but it occurs to me that the memory allocation involved in
constantly opening and closing a channel, specifically enabling and
disabling the sampled sound synthesizer each time, might be the source
of the error.

I have two questions then: Upon opening a sound channel with SndNewChannel,
is there any way to get a handle to the 'snth' resource that's been loaded
for it?  Also, is there any way to force it to be loaded at a particular
place in memory?  (I'd like to reserve room in the system heap beforehand, and
then keep it there.)
__________________________________________________________________

"May the forces of evil become confused on the way to your house."

Sincerely,                                        -- George Carlin
           Phaedrus
           (aka Colin Klipsch)
           sl161022@silver.bacs.indiana.edu
           Indiana University at Bloomington