[comp.sys.mac.programmer] Setting & Getting Sound Volume: Problems?

mbabramowicz@amherst.bitnet (04/06/91)

Are there any known problems associated with the procedures
GetSoundVol and SetSoundVol? I know you're not supposed to use
these procedures at all, but I thought that I had written
code that would avoid problems with, for example, interaction
with the Control Panel. (When my program goes into the background,
I restore the initial volume setting; and when the program comes back
into the foreground, I set the volume to whatever it was when the user
left, if necessary. However, sometimes, after leaving my program
and using another program involving sound (including my own
program in another partition), the volume becomes irregular when 
I return, fluctuating up and down without apparent reason. Is this
explainable?

All comments appreciated,
Michael

2fmlcalls@kuhub.cc.ukans.edu (04/06/91)

> into the foreground, I set the volume to whatever it was when the user
> left, if necessary. However, sometimes, after leaving my program
> and using another program involving sound (including my own
> program in another partition), the volume becomes irregular when 
> I return, fluctuating up and down without apparent reason. Is this
> explainable?
> 
> All comments appreciated,
> Michael

The only thing that comes to mind is that perhaps some background routine in
the other program is wresting with the volume.  If your program wrests with it
as well, then it may be toggling back and forth between app environments.  Of
course if you (and the other programs) only SetSoundVol during major switching
then who knows.

john calhoun