IOAudioLevelControl

Inherits from
IOAudioControl
Availability
Available in OS X v10.1 and later.
Declared in
IOAudioLevelControl.h

Overview

Tasks

Miscellaneous

Instance Methods

create

Allocates a new level control with the given attributes

static IOAudioLevelControl *create( SInt32 initialValue, SInt32 minValue, SInt32 maxValue, IOFixed minDB, IOFixed maxDB, UInt32 channelID, const char *channelName = 0, UInt32 cntrlID = 0, UInt32 subType = 0, UInt32 usage = 0);
Parameters
initialValue

The initial value of the control

minValue

The lowest possible value the control may have

maxValue

The highest possible value the control may have

minDB

A fixed point representation of the db value matching minValue

maxDB

A fixed point representation of the db value matching maxValue

channelID

The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h.

channelName

An optional name for the channel. Common names are located in IOAudioTypes.h.

cntrlID

An optional ID for the control that can be used to uniquely identify controls.

Return Value

Returns a newly allocted and initialized level IOAudioControl

init

Initializes a newly allocated IOAudioLevelControl with the given attributes

virtual bool init( SInt32 initialValue, SInt32 minValue, SInt32 maxValue, IOFixed minDB, IOFixed maxDB, UInt32 channelID, const char *channelName = 0, UInt32 cntrlID = 0, UInt32 subType = 0, UInt32 usage = 0, OSDictionary *properties = 0);
Parameters
initialValue

The initial value of the control

minValue

The lowest possible value the control may have

maxValue

The highest possible value the control may have

minDB

A fixed point representation of the db value matching minValue

maxDB

A fixed point representation of the db value matching maxValue

channelID

The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h.

channelName

An optional name for the channel. Common names are located in IOAudioTypes.h.

cntrlID

An optional ID for the control that can be used to uniquely identify controls.

properties

Standard property list passed to the init() function of any new IOService. This dictionary gets stored in the registry entry for this service.

Return Value

Returns true on success

setLinearScale

This function tells CoreAudio if it should apply a curve to the scaler representation of the volume.

virtual void setLinearScale( bool useLinearScale);
Parameters
useLinearScale

TRUE instructs CoreAudio to not apply a curve to the scaler representation of the volume, FALSE instructs CoreAudio to apply a curve, which is CoreAudio's default behavior.

setMaxDB

Sets the maximum value in db that the control may have

virtual void setMaxDB( IOFixed maxDB);
Parameters
maxDB

The maximum value in db for the control

Discussion

This value is represented as an IOFixed value which is a fixed point number. The IOFixed type is a 16.16 fixed point value.

setMaxValue

Sets the maximum value the control may have

virtual void setMaxValue( SInt32 maxValue);
Parameters
maxValue

The maximum value for the control

setMinDB

Sets the minimum value in db that the control may have

virtual void setMinDB( IOFixed minDB);
Parameters
minDB

The minimum value in db for the control

Discussion

This value is represented as an IOFixed value which is a fixed point number. The IOFixed type is a 16.16 fixed point value.

setMinValue

Sets the minimum value the control may have

virtual void setMinValue( SInt32 minValue);
Parameters
minValue

The minimum value for the control