Packageqnx.system
Classpublic class AudioManager
InheritanceAudioManager Inheritance flash.events.EventDispatcher

The AudioManager class provides the interface for controlling the volume level for all connected audio inputs and outputs.

See also

AudioInput
AudioOutput


Public Properties
 PropertyDefined By
  audioManager : AudioManager
[static] [read-only] Returns the Singleton instance of the AudioManager.
AudioManager
  availableInputs : Array
[read-only] Returns the list of available audio inputs.
AudioManager
  availableOutputs : Array
[read-only] Returns the list of available audio outputs.
AudioManager
  connectedInput : String
[read-only] Returns the currently attached audio input.
AudioManager
  connectedOutput : String
[read-only] Returns the currently attached audio output.
AudioManager
Public Methods
 MethodDefined By
  
Do not use this constructor to instantiate the AudioManager class.
AudioManager
  
getInputLevel(type:String = null):Number
Returns the current input level of the requested or connected audio input.
AudioManager
  
getInputMute(type:String = null):Boolean
Returns the current mute state of the requested or connected audio input.
AudioManager
  
getOutputLevel(type:String = null):Number
Returns the current output level of the requested or connected audio output.
AudioManager
  
getOutputMute(type:String = null):Boolean
Returns the current mute state of the requested or connected audio output.
AudioManager
  
setInputLevel(val:int, type:String = null):void
Sets the input volume level.
AudioManager
  
setInputMute(val:Boolean, type:String = null):void
Sets the input mute control.
AudioManager
  
setOutputLevel(val:Number, type:String = null):void
Sets the output volume level.
AudioManager
  
setOutputMute(val:Boolean, type:String = null):void
Sets the output mute control.
AudioManager
Events
 Event Summary Defined By
   Dispatched when the list of available audio inputs has changed.AudioManager
   Dispatched when the list of available audio outputs has changed.AudioManager
   Dispatched when the connected audio input has changed.AudioManager
   Dispatched when the connected audio output has changed.AudioManager
   Dispatched when an input level has changed.AudioManager
   Dispatched when an input mute control has changed.AudioManager
   Dispatched when an output level has changed.AudioManager
   Dispatched when an output mute control has changed.AudioManager
Property Detail
audioManagerproperty
audioManager:AudioManager  [read-only]

Returns the Singleton instance of the AudioManager. You can only instantiate a single instance in an application.

Do not instantiate the AudioManager from its public constructor.


Implementation
    public static function get audioManager():AudioManager
availableInputsproperty 
availableInputs:Array  [read-only]

Returns the list of available audio inputs.


Implementation
    public function get availableInputs():Array

See also

availableOutputsproperty 
availableOutputs:Array  [read-only]

Returns the list of available audio outputs.


Implementation
    public function get availableOutputs():Array

See also

connectedInputproperty 
connectedInput:String  [read-only]

Returns the currently attached audio input.


Implementation
    public function get connectedInput():String

See also

connectedOutputproperty 
connectedOutput:String  [read-only]

Returns the currently attached audio output.


Implementation
    public function get connectedOutput():String

See also

Constructor Detail
AudioManager()Constructor
public function AudioManager()

Do not use this constructor to instantiate the AudioManager class.

Instead, use the AudioManager.audioManager property to return the Singleton instance.

See also

Method Detail
getInputLevel()method
public function getInputLevel(type:String = null):Number

Returns the current input level of the requested or connected audio input.

Parameters

type:String (default = null) — If null the currently connected input is used, otherwise it must be one of the values in qnx.system.AudioInput.

Note: An Error is thrown if the currently connected inputs are not found.

Returns
Number — A Number representing the input value. The input level must be between 0 (min) to 1.0 (max).

See also

getInputMute()method 
public function getInputMute(type:String = null):Boolean

Returns the current mute state of the requested or connected audio input.

Parameters

type:String (default = null) — If null, the currently connected input is used, otherwise it must be one of the values in qnx.system.AudiInput.

Returns
Boolean — A Boolean indicating the mute value.
getOutputLevel()method 
public function getOutputLevel(type:String = null):Number

Returns the current output level of the requested or connected audio output.

Parameters

type:String (default = null) — If null the currently connected output is used, otherwise it must be one of the values in qnx.system.AudioOutput.

Note: An Error is thrown if the currently connected outputs are not found.

Returns
Number — A Boolean representing the output level. The output level retured is between 0 (min) to 1.0 (max)
getOutputMute()method 
public function getOutputMute(type:String = null):Boolean

Returns the current mute state of the requested or connected audio output.

Parameters

type:String (default = null) — If null, the currently connected output is used otherwise it must be one of the values in qnx.system.AudioOutput.

Returns
Boolean — A Boolean indicating the mute value.

See also

setInputLevel()method 
public function setInputLevel(val:int, type:String = null):void

Sets the input volume level.

This function dispatches a qnx.events.AudioManagerEvent.INPUT_LEVEL_CHANGED event when the input changes.

Parameters

val:int — Indicates the input level value. Valid values are 0 (minumum audio input level) to 1 (maximun audio input level).
 
type:String (default = null) — If null, currently connected inout is affected, otherwise must be one of the values in qnx.system.AudioInput.

See also

setInputMute()method 
public function setInputMute(val:Boolean, type:String = null):void

Sets the input mute control.

This function dispatches a qnx.events.AudioManagerEvent.INPUT_MUTE_CHANGED event when the input is muted.

Parameters

val:Booleantrue mutes input, false unmute input.
 
type:String (default = null) — If null, the currently connected input is affected, otherwise the vale must be one of the values in qnx.system.AudioInput.

See also

setOutputLevel()method 
public function setOutputLevel(val:Number, type:String = null):void

Sets the output volume level.

This function dispatches a qnx.events.AudioManagerEvent.OUTPUT_LEVEL_CHANGED event when the output changes.

Parameters

val:Number — Indicates the output level value. Valid values are 0 (minumum audio output level) to 1 (maximun audio output level).
 
type:String (default = null) — If null, the currently connected output is affected, otherwise must be one of the values in qnx.system.AudioOutput.

See also

setOutputMute()method 
public function setOutputMute(val:Boolean, type:String = null):void

Sets the output mute control.

This function dispatches a qnx.events.AudioManagerEvent.OUTPUT_MUTE_CHANGED event when the output it muted.

Parameters

val:Booleantrue mutes output, false unmute output.
 
type:String (default = null) — If null, currently connected output is affected, otherwise it must be one of the values in qnx.system.AudioOutput.

See also

Event Detail
availableInputsChanged Event
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.AVAILABLE_INPUTS_CHANGED

Dispatched when the list of available audio inputs has changed.
availableOutputsChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.AVAILABLE_OUTPUTS_CHANGED

Dispatched when the list of available audio outputs has changed.
connectedInputChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.CONNECTED_INPUT_CHANGED

Dispatched when the connected audio input has changed.
connectedOutputChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.CONNECTED_OUTPUT_CHANGED

Dispatched when the connected audio output has changed.
inputLevelChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.INPUT_LEVEL_CHANGED

Dispatched when an input level has changed.
inputMuteChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.INPUT_MUTE_CHANGED

Dispatched when an input mute control has changed.
outputLevelChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.OUTPUT_LEVEL_CHANGED

Dispatched when an output level has changed.
outputMuteChanged Event  
Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.OUTPUT_MUTE_CHANGED

Dispatched when an output mute control has changed.