[comp.sys.mac.programmer] Setting the Sound Volume

koster@let.vu.nl (C. Koster) (08/30/88)

I made a XFCN that does a simple SetSoundVol. Works fine. But when I check with
the General or Sound control panel device it shows the old SoundVol. Should I do
something else after SetSoundVol, or is it the Control panel's fault? Does the
Control Panel use GetSysPPtr or does it store the values somewhere else? I'm
working with System 6.0 (Control Panel 3.3).

BTW, who knows who wrote the GetAppIcon XFCN, and how to reach him?

Martijn Koster                             "I Know Nothing!"
Internet: koster@let.vu.nl                       Manuel in Fawlty Towers
Bitnet: u00300@hasara5 or V43ucor@hasara11

newton@mtund.ATT.COM (Newton Lee) (08/31/88)

In article <550@vulet.let.vu.nl.UUCP>, koster@let.vu.nl (C. Koster) writes:
> I made a XFCN that does a simple SetSoundVol. Works fine. But when I check
> with the General or Sound control panel device it shows the old SoundVol.

When I change the sound volume on Mac SE, I do (in C):

	SetSoundVol(volume);
	SysParam = GetSysPPtr();
	SysParam->volClik = (sysParam->volClik & 0xF8FF) | (volume << 8);

The first line sets the speaker volume to the specified level but it
doesn't change the volume setting in the control panel. The second and
third lines adjust the control panel volume setting by changing the
parameter RAM.

Newton Lee
AT&T Bell Laboratories