Mac Developer Library

Developer

IOAudioLevelControl Class Reference

Options
Deployment Target:

On This Page
Language:

IOAudioLevelControl

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.1 and later.

  • Allocates a new level control with the given attributes

    Declaration

    C++

    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

  • Initializes a newly allocated IOAudioLevelControl with the given attributes

    Declaration

    C++

    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

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

    Declaration

    C++

    virtual void setLinearScale( booluseLinearScale);

    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.

  • Sets the maximum value in db that the control may have

    Declaration

    C++

    virtual void setMaxDB( IOFixedmaxDB);

    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.

  • Sets the maximum value the control may have

    Declaration

    C++

    virtual void setMaxValue( SInt32maxValue);

    Parameters

    maxValue

    The maximum value for the control

  • Sets the minimum value in db that the control may have

    Declaration

    C++

    virtual void setMinDB( IOFixedminDB);

    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.

  • Sets the minimum value the control may have

    Declaration

    C++

    virtual void setMinValue( SInt32minValue);

    Parameters

    minValue

    The minimum value for the control