Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 6 - Audio Components / Audio Components Reference
Audio Component-Defined Routines / Managing the Mute State


Legacy Documentclose button

Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.

AudioGetMute

An audio component can implement the AudioGetMute function. The Sound Manager calls this function to determine the current mute state of an audio port.

pascal ComponentResult AudioGetMute (ComponentInstance ac, 
                                       short whichChannel, 
                                       short *mute);
ac
A component instance that identifies your audio component.
whichChannel
The channel or channels whose mute state you should return.
mute
On output, the current mute state of the specified channel.
DESCRIPTION
Your AudioGetMute function is called by the Sound Manager to determine the current mute state of one or more channels of an audio port. The following constants define the mute states you can return in the mute parameter:

#define audioUnmuted             0        /*device is not muted*/
#define audioMuted               1        /*device is muted*/
The whichChannel parameter indicates the channels or channels whose mute state you should return. The following constants are defined for the whichChannel parameter:

#define audioAllChannels         0        /*all channels*/
#define audioLeftChannel         1        /*left channel*/
#define audioRightChannel        2        /*right channel*/
RESULT CODES
Your AudioGetMute function should return noErr if successful or an appropriate result code otherwise. In particular, if your audio component doesn't support software control of mute states, AudioGetMute should return unImpErr.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996