stbAudioOutput

stbAudioOutput

Tutorials:

stbAudioOutput instance.

Not accessible in global scope.
Can't be manually created but can be received from other STB global objects.

Members

(static) list :Array.<stbPlayer>

An object linked with this audio output.

By default player #0 is linked with audio output #0.

Type:
Example
// get audio output #1 instance
var output = stbAudioManager.list[1];
// get audio source #0
output.list[0];

(static) mute :boolean

Master mute state of audio output.

After the cycle of switching off/on with this property the volume level remains unchanged.

Type:
  • boolean

(static) volume :number

Master volume level in percents (0 - no sound, 100 - maximal level).

Type:
  • number

(static) volumeScaleType :stbAudioOutput~volumeScaleType

Default Value:
  • 0

Volume scale type.

Type:

(static, readonly) VOLUME_SCALE_TYPE_LOGARITHMIC :number

See:

Volume levels are represented in logarithmic scale (decibels).

Type:
  • number

(static, readonly) VOLUME_SCALE_TYPE_LINEAR :number

See:

Volume levels are represented in linear scale.

Type:
  • number

Methods

(static) add(source) → {boolean}

Add link with this audio output.

Added object will replace previous one.

Example
// get audio output #0 instance
var output = stbAudioManager.list[0];
// link to player #0
output.list[0]
// get audio source #1 instance
var player = stbPlayerManager.list[1];
output.add(player);
// link to player #1
output.list[0]
Parameters:
Name Type Description
source stbPlayer
Returns:
Type
boolean

(static) remove(source) → {boolean}

Remove link with this audio output.

Example
// get audio output #0 instance
var output = stbAudioManager.list[0];
// get audio source #1 instance
var player = stbPlayerManager.list[1];
output.remove(player);
Parameters:
Name Type Description
source stbPlayer
Returns:
Type
boolean

(static) clear()

Clear all links with this audio output.

Type Definitions

volumeScaleType

See:

Volume scale type.

Type:
  • number