IToiAudioOutputService Interface Reference


Description

IToiAudioOutputService 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 "IToiAudioOutputService.idl";

List of all members.

Public Member Functions

void GetConnections (out TToiAudioConnectionDescriptorSequence connectionList)
void GetConfiguration (out string address)
void CreateConfigurationSession (in IToiApplicationService::TToiApplicationId applicationId, out string address) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void SetVolume (in TToiAudioConnectionId connectionId, in unsigned long level) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void GetVolume (in TToiAudioConnectionId connectionId, out unsigned long level) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void SetMuteState (in TToiAudioConnectionId connectionId, in boolean state) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void GetMuteState (in TToiAudioConnectionId connectionId, out boolean state) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void SetLatency (in TToiAudioConnectionId connectionId, in long latency) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void GetLatency (in TToiAudioConnectionId connectionId, out long latency) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Classes

struct  TToiAudioConnectionDescriptor

Public Types

enum  TToiAudioConnectionType {
  AUDIO_CONNECTION_TYPE_ANALOG, AUDIO_CONNECTION_TYPE_SPDIF, AUDIO_CONNECTION_TYPE_HDMI, AUDIO_CONNECTION_TYPE_DECODER,
  AUDIO_CONNECTION_TYPE_BUFFER, AUDIO_CONNECTION_TYPE_I2S
}
enum  TToiAudioConnectionDirection { AUDIO_CONNECTION_DIRECTION_INPUT, AUDIO_CONNECTION_DIRECTION_OUTPUT }
typedef long TToiAudioConnectionId
typedef sequence
< TToiAudioConnectionDescriptor
TToiAudioConnectionDescriptorSequence

Member Typedef Documentation

Audio connection identifier type.


Member Enumeration Documentation

Input or output connection direction.

Enumerator:
AUDIO_CONNECTION_DIRECTION_INPUT 

The connection is an input.

AUDIO_CONNECTION_DIRECTION_OUTPUT 

The connection is an output.

Audio connection types.

Enumerator:
AUDIO_CONNECTION_TYPE_ANALOG 

Analog connection.

AUDIO_CONNECTION_TYPE_SPDIF 

S/PDIF connection.

AUDIO_CONNECTION_TYPE_HDMI 

HDMI connection.

AUDIO_CONNECTION_TYPE_DECODER 

Decoder connection, one of the inputs to the audio mixer. If digital audio is decoded to PCM it is done by the decoder.

AUDIO_CONNECTION_TYPE_BUFFER 

Memory buffer connection, one of the inputs to the audio mixer. If audio overlay is supported, it is stored in this memory buffer.

AUDIO_CONNECTION_TYPE_I2S 

I2S connection.


Member Function Documentation

void IToiAudioOutputService::CreateConfigurationSession ( in IToiApplicationService::TToiApplicationId  applicationId,
out string  address 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Creates and returns a session to change the audio output configuration. The session is active between this call and either IToiAudioOutputConfigurationSession::Apply() or IToiAudioOutputConfigurationSession::Revert().

Parameters:
applicationId The identifier of the calling application.
Return values:
address The IToiAudioOutputConfigurationSession address.
Exceptions:
TToiInvalidArgumentException Raised if the application identifier is invalid.
TToiInvalidPreconditionException Raised if another session is active.
void IToiAudioOutputService::GetConfiguration ( out string  address  ) 

Returns the audio output configuration.

Return values:
address The IToiAudioOutputConfiguration address.
void IToiAudioOutputService::GetConnections ( out TToiAudioConnectionDescriptorSequence  connectionList  ) 

Returns available audio connections.

Return values:
connectionList The list available audio connections.
void IToiAudioOutputService::GetLatency ( in TToiAudioConnectionId  connectionId,
out long  latency 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change. Returns the audio latency of a connection.
Parameters:
connectionId The identifier of the connection to query.
Return values:
latency The audio latency in milliseconds.
Exceptions:
TToiInvalidArgumentException Raised if there is no such connection.
TToiOperationNotSupportedException Raised if the latency for the connection is not adjustable.
void IToiAudioOutputService::GetMuteState ( in TToiAudioConnectionId  connectionId,
out boolean  state 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)

Returns the mutes state of a connection.

Parameters:
connectionId The identifier of the connection to query.
Return values:
state The mute state.
Exceptions:
TToiInvalidArgumentException Raised if there is no such connection.
TToiOperationNotSupportedException Raised if the connection is not mutable.
void IToiAudioOutputService::GetVolume ( in TToiAudioConnectionId  connectionId,
out unsigned long  level 
) 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.

Parameters:
connectionId The identifier of the connection to query.
Return values:
level The volume level.
Exceptions:
TToiInvalidArgumentException Raised if there is no such connection.
TToiOperationNotSupportedException Raised if the volume for the connection is not adjustable.
void IToiAudioOutputService::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException)

Register an observer of type IToiAudioOutputObserver. The observer will receive events sent by this IToiAudioOutputService instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiAudioOutputService can find an IToiAudioOutputObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address.
See also:
IToiAudioOutputObserver
void IToiAudioOutputService::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException)

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiAudioOutputService can find the registered IToiAudioOutputObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiAudioOutputObserver
void IToiAudioOutputService::SetLatency ( in TToiAudioConnectionId  connectionId,
in long  latency 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change. Set an audio connection audio latency. latency is in milliseconds. This should affect all audio formats. If the latency parameter is out of range, the closest supported value is set. Setting the latency for one connection may impact the latency for other connections. In this case, the IToiAudioOutputObserver::OnLatencyChanged() will be called for all the impacted connections.
Parameters:
connectionId The identifier of the connection for which the audio latency will be changed.
latency The desired audio latency in milliseconds.
Exceptions:
TToiInvalidArgumentException Raised if there is no such connection.
TToiOperationNotSupportedException Raised if the latency for the connection is not adjustable.
void IToiAudioOutputService::SetMuteState ( in TToiAudioConnectionId  connectionId,
in boolean  state 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException)

Sets the mute state of a connection.

Parameters:
connectionId The identifier of the connection to query.
state The desired mute state.
Exceptions:
TToiInvalidArgumentException Raised if there is no such connection.
TToiOperationNotSupportedException Raised if the connection is not mutable.
void IToiAudioOutputService::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.

Parameters:
connectionId The identifier of the connection for which the volume will be changed.
level The desired volume level.
Exceptions:
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.