ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOAudioLevelControl

Inherits from:
Declared In:

Overview



Functions

create

Allocates a new level control with the given attributes

init

Initializes a newly allocated IOAudioLevelControl with the given attributes

setLinearScale

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

setMaxDB

Sets the maximum value in db that the control may have

setMaxValue

Sets the maximum value the control may have

setMinDB

Sets the minimum value in db that the control may have

setMinValue

Sets the minimum value the control may have


create


Allocates a new level control with the given attributes

public

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

public

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.

public

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

public

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

public

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

public

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

public

virtual void setMinValue( SInt32 minValue);
Parameters
minValue

The minimum value for the control


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19