qnx.system.AudioManager

AudioManager

Properties | Methods | Events


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.

Class information:
PlayBook Tablet OS Version:   1.0.6

See also

AudioInput
AudioOutput



Public Properties

 PropertyDefined By
  audioBoostEnabled : Boolean
[read-only] Returns true if AudioBoost has been enabled, and headphones are plugged in.
AudioManager
  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
  
decreaseOutputLevel(type:String = null):void
Decreases the output volume level.
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
  
getMaxOutputLevel(type:String = null):Number
Returns the maximum allowed output level of the requested or connected audio output.
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
  
getVolumeControl(type:String = null):String
Returns the volume control type of the requested or connected audio output.
AudioManager
  
increaseOutputLevel(type:String = null):void
Increases the output volume level.
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

audioBoostEnabled


audioBoostEnabled:Boolean  [read-only]

Returns true if AudioBoost has been enabled, and headphones are plugged in.


Implementation

public function get audioBoostEnabled():Boolean

audioManager


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

availableInputs


availableInputs:Array  [read-only]

Returns the list of available audio inputs.


Implementation

public function get availableInputs():Array

See also

AudioInput

availableOutputs


availableOutputs:Array  [read-only]

Returns the list of available audio outputs.


Implementation

public function get availableOutputs():Array

See also

AudioOutput

connectedInput


connectedInput:String  [read-only]

Returns the currently attached audio input.


Implementation

public function get connectedInput():String

See also

AudioInput

connectedOutput


connectedOutput:String  [read-only]

Returns the currently attached audio output.


Implementation

public function get connectedOutput():String

See also

AudioOutput

Constructor Detail

AudioManager()


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

audioManager

Method Detail

decreaseOutputLevel()


public function decreaseOutputLevel(type:String = null):void

Decreases the output volume level.

For devices which support percentage based volume control, this function will dispatch a qnx.events.AudioManagerEvent.OUTPUT_LEVEL_CHANGED event when the output changes.

Parameters

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

AudioManagerEvent

getInputLevel()


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.

Returns

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

See also

AudioInput

getInputMute()


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.

getMaxOutputLevel()


public function getMaxOutputLevel(type:String = null):Number

Returns the maximum allowed 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.

Returns

Number — A Number representing the maximum output level. The output level retured is between 0 (min) to 1.0 (max)

getOutputLevel()


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.

Returns

Number — A Number representing the output level. The output level retured is between 0 (min) to 1.0 (max)

getOutputMute()


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

AudioOutput

getVolumeControl()


public function getVolumeControl(type:String = null):String

Returns the volume control type 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

String — A string representing the volume control type (see qnx.system.AudioVolumeControl).

increaseOutputLevel()


public function increaseOutputLevel(type:String = null):void

Increases the output volume level.

For devices which support percentage based volume control, this function will dispatch a qnx.events.AudioManagerEvent.OUTPUT_LEVEL_CHANGED event when the output changes.

Parameters

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

AudioManagerEvent

setInputLevel()


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 100 (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

AudioInput

setInputMute()


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

AudioManagerEvent
AudioInput

setOutputLevel()


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

AudioManagerEvent

setOutputMute()


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

AudioManagerEvent

Event Detail

availableInputsChanged


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 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 Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.CONNECTED_INPUT_CHANGED

Dispatched when the connected audio input has changed.

connectedOutputChanged


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 Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.INPUT_LEVEL_CHANGED

Dispatched when an input level has changed.

inputMuteChanged


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 Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.OUTPUT_LEVEL_CHANGED

Dispatched when an output level has changed.

outputMuteChanged


Event Object Type: qnx.events.AudioManagerEvent
AudioManagerEvent.type property = qnx.events.AudioManagerEvent.OUTPUT_MUTE_CHANGED

Dispatched when an output mute control has changed.