Telematics SDK - API Reference
v1.51.0
|
Data Structures | |
struct | telux::audio::FormatParams |
struct | telux::audio::AmrwbpParams |
struct | telux::audio::StreamConfig |
struct | telux::audio::FormatInfo |
class | telux::audio::IAudioListener |
class | telux::audio::IAudioManager |
Audio Manager is a primary interface for audio operations. It provide APIs to manage Streams ( like voice, play, record etc) and sound cards. More... | |
class | telux::audio::IAudioDevice |
Audio device and it's characteristics like Direction (Sink or Source), type. More... | |
Typedefs | |
using | telux::audio::GetDevicesResponseCb = std::function< void(std::vector< std::shared_ptr< IAudioDevice >> devices, telux::common::ErrorCode error)> |
using | telux::audio::GetStreamTypesResponseCb = std::function< void(std::vector< StreamType > streamTypes, telux::common::ErrorCode error)> |
using | telux::audio::CreateStreamResponseCb = std::function< void(std::shared_ptr< IAudioStream > &stream, telux::common::ErrorCode error)> |
using | telux::audio::CreateTranscoderResponseCb = std::function< void(std::shared_ptr< ITranscoder > &transcoder, telux::common::ErrorCode error)> |
using | telux::audio::DeleteStreamResponseCb = std::function< void(telux::common::ErrorCode error)> |
using | telux::audio::GetCalInitStatusResponseCb = std::function< void(CalibrationInitStatus calInitStatus, telux::common::ErrorCode error)> |
This section contains APIs related to Audio Manager operation.
struct telux::audio::FormatParams |
Frame format common parameters
struct telux::audio::AmrwbpParams |
Frame format codec specific parameters
Data Fields | |
uint32_t | bitWidth |
AmrwbpFrameFormat | frameFormat |
uint32_t telux::audio::AmrwbpParams::bitWidth |
Bitwidth of Stream, Typical Values <16/24>.
AmrwbpFrameFormat telux::audio::AmrwbpParams::frameFormat |
struct telux::audio::StreamConfig |
Common Stream configuration parameters
Data Fields | ||
---|---|---|
StreamType | type | |
int | modemSubId |
|
SlotId | slotId |
Represents slotId, applicable for voice call only |
uint32_t | sampleRate |
Sample Rate of Stream, Typical Values <8k/16k/32k/48k> |
ChannelTypeMask | channelTypeMask | |
AudioFormat | format | |
vector< DeviceType > | deviceTypes | |
vector< Direction > | voicePaths |
Represent voice path direction for in call audio. TX for Uplink and RX for Downlink.> |
FormatParams * | formatParams | |
EcnrMode | ecnrMode |
Represents ECNR mode for stream. It is applicable only to StreamType::VOICE_CALL |
struct telux::audio::FormatInfo |
Represents information about the audio format.
Data Fields | ||
---|---|---|
uint32_t | sampleRate |
Sample Rate of audio, Typical Values <8k/16k/32k/48k> |
ChannelTypeMask | mask |
parameter for configuration of channel type |
AudioFormat | format |
Represents audio format |
FormatParams * | params |
Represents codec specific parameters, like Frame Format |
class telux::audio::IAudioListener |
Public Member Functions | |
virtual | ~IAudioListener () |
Public Member Functions inherited from telux::common::IServiceStatusListener | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
Destructor of IAudioListener
class telux::audio::IAudioManager |
Audio Manager is a primary interface for audio operations. It provide APIs to manage Streams ( like voice, play, record etc) and sound cards.
|
virtual |
|
pure virtual |
Checks the status of audio subsystems and returns the result.
|
pure virtual |
This status indicates whether the object is in a usable state or not.
|
pure virtual |
Wait for Audio subsystem to be ready.
|
pure virtual |
Get the list of supported audio devices, which are currently supported in the audio subsystem
[in] | callback | callback pointer to get the response of getDevices. |
|
pure virtual |
Get the list of supported audio streams types, which are currently supported in the audio subsystem
[in] | callback | callback pointer to get the response of getStreamTypes. |
|
pure virtual |
Creates the stream for audio operation
On platforms with Access control enabled, Caller needs to have TELUX_AUDIO_VOICE or TELUX_AUDIO_PLAY or TELUX_AUDIO_CAPTURE or TELUX_AUDIO_FACTORY_TEST permission to invoke this API successfully.
[in] | streamConfig | stream configuration. |
[in] | callback | callback pointer to get the response of createStream. |
|
pure virtual |
Creates an instance of transcoder that can be used for transcoding operations. The supported transcoding is real time transcoding, which takes the playback time of file for completing the opearation. Each instance returned can be used for single transcoding operation. The instance can not be used for multiple transcoding operation.
On platforms with Access control enabled, Caller needs to have TELUX_AUDIO_TRANSCODE permission to invoke this API successfully.
[in] | input | configuration of input buffers that needs to be transcoded. |
[in] | output | configuration of transcoded output buffers. |
[in] | callback | callback pointer to get the response of createTranscoder. |
|
pure virtual |
Deletes the specified stream which was created before
On platforms with Access control enabled, Caller needs to have TELUX_AUDIO_VOICE or TELUX_AUDIO_PLAY or TELUX_AUDIO_CAPTURE or TELUX_AUDIO_FACTORY_TEST permission to invoke this API successfully.
[in] | stream | reference to stream to be deleted. |
[in] | callback | callback pointer to get the response of deleteStream. |
|
pure virtual |
Register a listener to get notified when service status changes.
[in] | listener | Pointer of IServiceListener object that processes the notification |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered IServiceListener that needs to be removed |
|
pure virtual |
Get calibration status. Returns whether audio subsystem was able to successfully initialize calibration in system. Calibration init status is available after the initialization of the audio subsystem or after re-intialization of audio subsytem in case of sub system restart is triggered.
[in] | callback | callback pointer to get the response of getCalibrationInitStatus. |
class telux::audio::IAudioDevice |
Audio device and it's characteristics like Direction (Sink or Source), type.
Public Member Functions | |
virtual DeviceType | getType ()=0 |
virtual DeviceDirection | getDirection ()=0 |
virtual | ~IAudioDevice () |
|
virtual |
|
pure virtual |
Get the type of Device (i.e SPEAKER, MIC etc)
|
pure virtual |
Provide direction of device whether is Sink for audio data ( RX i.e. speaker, etc) or Source for audio data ( TX i.e. mic, etc)
using telux::audio::GetDevicesResponseCb = typedef std::function<void(std::vector<std::shared_ptr<IAudioDevice>> devices, telux::common::ErrorCode error)> |
This function is called with the response to getDevices API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | devices | Devices list. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetStreamTypesResponseCb = typedef std::function<void(std::vector<StreamType> streamTypes, telux::common::ErrorCode error)> |
This function is called with the response to getStreamTypes API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | streamTypes | Stream type list. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::CreateStreamResponseCb = typedef std::function<void(std::shared_ptr<IAudioStream> &stream, telux::common::ErrorCode error)> |
This function is called with the response to createStream API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | stream | Interface pointer of Stream created. VOICE_CALL - Provides IAudioVoiceStream pointer PLAY - Provides IAudioPlayStream pointer CAPTURE - Provides IAudioCaptureStream pointer |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::CreateTranscoderResponseCb = typedef std::function<void( std::shared_ptr<ITranscoder> &transcoder, telux::common::ErrorCode error)> |
This function is called with the response to createTranscoder API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | transcoder | Interface pointer of transcoder. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::DeleteStreamResponseCb = typedef std::function<void(telux::common::ErrorCode error)> |
This function is called with the response to deleteStream API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetCalInitStatusResponseCb = typedef std::function<void(CalibrationInitStatus calInitStatus, telux::common::ErrorCode error)> |
This function is called with the response to getCalibrationInitStatus API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | calInitStatus | State of calibration initialization. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
|
strong |
|
strong |
Represent Stream Type
|
strong |
|
strong |
|
strong |
Enable/Disable ECNR(Echo Cancellation and Noise Reduction) on the audio stream. When enabling this the audio stream should be associated with devices that are capable of doing ECNR. It is only applicable to StreamType::VOICE_CALL.
Enumerator | |
---|---|
DISABLE |
To disable the ECNR mode |
ENABLE |
To enable the ECNR mode. Applicable only to StreamType::VOICE_CALL |
|
strong |
Represents state of Audio calibration initialization in system. API gives status that tells whether the calibration initialized by audio sub system.
Enumerator | |
---|---|
UNKNOWN |
calibration initialization status is unknown |
INIT_SUCCESS |
calibration initialized successfully |
INIT_FAILED |
calibration initialization failed |