ToiAudioOutputService is used for controlling audio outputs. It allows the client to control how to decode and mix audio content and route the modified/unmodified content to the outputs.
import "ToiAudioOutputService.idl";
Public Member Functions | |
TToiAudioConnectionDescriptorSequence | getConnections () |
ToiAudioOutputConfiguration | getConfiguration () |
ToiAudioOutputConfigurationSession | createConfigurationSession () raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
void | setVolume (in TToiAudioConnectionId connectionId, in unsigned long level) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
unsigned long | getVolume (in TToiAudioConnectionId connectionId) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
void | setMuteState (in TToiAudioConnectionId connectionId, in boolean state) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
boolean | getMuteState (in TToiAudioConnectionId connectionId) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
void | setLatency (in TToiAudioConnectionId connectionId, in long latency) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
long | getLatency (in TToiAudioConnectionId connectionId) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
void | addEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException) |
void | removeEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException) |
Public Attributes | |
Events | |
const long | ON_CONFIGURATION_CHANGED = 3100 |
const long | ON_VOLUME_CHANGED = 3101 |
const long | ON_MUTE_STATE_CHANGED = 3102 |
const long | ON_HDMI_CONNECTION_STATUS_CHANGED = 3103 |
const long | ON_LATENCY_CHANGED = 3104 |
TToiAudioConnectionType | |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_ANALOG = 0 |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_SPDIF = 1 |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_HDMI = 2 |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_DECODER = 3 |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_BUFFER = 4 |
const TToiAudioConnectionType | AUDIO_CONNECTION_TYPE_I2S = 5 |
TToiAudioConnectionDirection | |
const TToiAudioConnectionDirection | AUDIO_CONNECTION_DIRECTION_INPUT = 0 |
const TToiAudioConnectionDirection | AUDIO_CONNECTION_DIRECTION_OUTPUT = 1 |
Public Types | |
typedef long | TToiAudioConnectionId |
typedef long | TToiAudioConnectionType |
typedef long | TToiAudioConnectionDirection |
typedef sequence < ToiAudioOutputServiceAudioConnectionDescriptor > | TToiAudioConnectionDescriptorSequence |
typedef sequence< ToiAudioOutputServiceAudioConnectionDescriptor > ToiAudioOutputService::TToiAudioConnectionDescriptorSequence |
List of connections.
typedef long ToiAudioOutputService::TToiAudioConnectionDirection |
Input or output connection direction.
typedef long ToiAudioOutputService::TToiAudioConnectionId |
Audio connection identifier type.
typedef long ToiAudioOutputService::TToiAudioConnectionType |
Audio connection types.
void ToiEventTarget::addEventListener | ( | in long | type, | |
in ToiEventListener | listener | |||
) | raises (TToiInvalidArgumentException) [inherited] |
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
type | The event type of the event to subscribe to. | |
listener | The JavaScript function that will receive events. |
TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice. |
ToiAudioOutputConfigurationSession ToiAudioOutputService::createConfigurationSession | ( | ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Creates and returns a session to change the audio output configuration. The session is active between this call and either ToiAudioOutputConfigurationSession::apply() or ToiAudioOutputConfigurationSession::revert().
IToiAudioOutputConfigurationSession |
TToiInvalidArgumentException | Raised if the application identifier is invalid. | |
TToiInvalidPreconditionException | Raised if another session is active. |
ToiAudioOutputConfiguration ToiAudioOutputService::getConfiguration | ( | ) |
Returns the audio output configuration.
IToiAudioOutputConfiguration |
TToiAudioConnectionDescriptorSequence ToiAudioOutputService::getConnections | ( | ) |
Returns available audio connections.
connectionList | The list available audio connections. |
long ToiAudioOutputService::getLatency | ( | in TToiAudioConnectionId | connectionId | ) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
connectionId | The identifier of the connection to query. |
latency | The audio latency in milliseconds. |
TToiInvalidArgumentException | Raised if there is no such connection. | |
TToiOperationNotSupportedException | Raised if the latency for the connection is not adjustable. |
boolean ToiAudioOutputService::getMuteState | ( | in TToiAudioConnectionId | connectionId | ) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
Returns the mutes state of a connection.
connectionId | The identifier of the connection to query. |
state | The mute state. |
TToiInvalidArgumentException | Raised if there is no such connection. | |
TToiOperationNotSupportedException | Raised if the connection is not mutable. |
unsigned long ToiAudioOutputService::getVolume | ( | in TToiAudioConnectionId | connectionId | ) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
Returns the audio volume level of a connection. Possible level range from 0 and 100 where 0 is the lowest volume and 100 the highest volume.
connectionId | The identifier of the connection to query. |
level | The volume level. |
TToiInvalidArgumentException | Raised if there is no such connection. | |
TToiOperationNotSupportedException | Raised if the volume for the connection is not adjustable. |
void ToiEventTarget::removeEventListener | ( | in long | type, | |
in ToiEventListener | listener | |||
) | raises (TToiInvalidArgumentException) [inherited] |
This method removes an event listener for a specific event.
type | The event type of the event to remove the listener from. | |
listener | The JavaScript function that was previously added as an event listener. |
TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener had not previously been added. |
void ToiAudioOutputService::setLatency | ( | in TToiAudioConnectionId | connectionId, | |
in long | latency | |||
) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
connectionId | The identifier of the connection for which the audio latency will be changed. | |
latency | The desired audio latency in milliseconds. |
TToiInvalidArgumentException | Raised if there is no such connection. | |
TToiOperationNotSupportedException | Raised if the latency for the connection is not adjustable. |
void ToiAudioOutputService::setMuteState | ( | in TToiAudioConnectionId | connectionId, | |
in boolean | state | |||
) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
Sets the mute state of a connection.
connectionId | The identifier of the connection to query. | |
state | The desired mute state. |
TToiInvalidArgumentException | Raised if there is no such connection. | |
TToiOperationNotSupportedException | Raised if the connection is not mutable. |
void ToiAudioOutputService::setVolume | ( | in TToiAudioConnectionId | connectionId, | |
in unsigned long | level | |||
) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException) |
Set an audio connection volume level. The level can be adjusted between 0 and 100 where 0 is the lowest volume and 100 the highest volume. The volume is only affected if the content is decoded or non compressed.
connectionId | The identifier of the connection for which the volume will be changed. | |
level | The desired volume level. |
TToiInvalidArgumentException | Raised if there is no such connection or if the level is outside the allowed interval. | |
TToiOperationNotSupportedException | Raised if the volume for the connection is not adjustable. |
The connection is an input.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_DIRECTION_INPUT.
The connection is an output.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_DIRECTION_OUTPUT.
Analog connection.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_ANALOG.
Memory buffer connection, one of the inputs to the audio mixer. If audio overlay is supported, it is stored in this memory buffer.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_BUFFER.
Decoder connection, one of the inputs to the audio mixer. If digital audio is decoded to PCM it is done by the decoder.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_DECODER.
HDMI connection.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_HDMI.
I2S connection.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_I2S.
S/PDIF connection.
This constant can also be accessed from toi.consts.ToiAudioOutputService.AUDIO_CONNECTION_TYPE_SPDIF.
const long ToiAudioOutputService::ON_CONFIGURATION_CHANGED = 3100 |
This is an Event identifier for ToiAudioOutputConfigurationChangedEvent.
This constant can also be accessed from toi.consts.ToiAudioOutputService.ON_CONFIGURATION_CHANGED.
const long ToiAudioOutputService::ON_HDMI_CONNECTION_STATUS_CHANGED = 3103 |
This is an Event identifier for ToiAudioOutputHdmiConnectionStatusChangedEvent.
This constant can also be accessed from toi.consts.ToiAudioOutputService.ON_HDMI_CONNECTION_STATUS_CHANGED.
const long ToiAudioOutputService::ON_LATENCY_CHANGED = 3104 |
This is an Event identifier for ToiAudioOutputLatencyChangedEvent.
This constant can also be accessed from toi.consts.ToiAudioOutputService.ON_LATENCY_CHANGED.
const long ToiAudioOutputService::ON_MUTE_STATE_CHANGED = 3102 |
This is an Event identifier for ToiAudioOutputMuteStateChangedEvent.
This constant can also be accessed from toi.consts.ToiAudioOutputService.ON_MUTE_STATE_CHANGED.
const long ToiAudioOutputService::ON_VOLUME_CHANGED = 3101 |
This is an Event identifier for ToiAudioOutputVolumeChangedEvent.
This constant can also be accessed from toi.consts.ToiAudioOutputService.ON_VOLUME_CHANGED.