AudioDecoder Class

AAD Class

Description
A class used to decode an audio data stream using AAC (Advanced Audio Codec) standard.

Syntax
class AAD

Members

Public Constructors
AAD::AADCreate an instance of the AAD object.
Public Methods 
AAD::configAudioConfigure AAD module by setting up audio configuration parameters.
AAD::beginStart AAD module audio decoder.
AAD::endStop AAD module audio decoder.

AAD::configAudio

Description
Configure AAD module by setting up audio configuration parameters.

Syntax
void configAudio(AudioSetting& config);

Parameters
config: AudioSetting object containing desired audio configuration.

Returns
NA

Example Code
Example: RTPAudioStream
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Video/examples/Audio/RTPAudioStream/RTPAudioStream.ino)

Notes and Warnings
“AudioDecoder.h” must be included to use the class function.

AAD::begin

Description
Start AAD audio decoder.

Syntax
void begin(void);

Parameters
NA

Returns
NA

Example Code
Example: RTPAudioStream
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Video/examples/Audio/RTPAudioStream/RTPAudioStream.ino)

Notes and Warnings
“AudioDecoder.h” must be included to use the class function.

AAD::end

Description
Stop AAD audio decoder.

Syntax
void end(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“AudioDecoder.h” must be included to use the class function.

G711D Class

Description
A class used to decode an audio data stream using ITU-T G.711 standard.

Syntax
class G711D

Members

Public Constructors
G711D::G711DConstructs a G711D object.
Public Methods 
G711D::configAudioConfigure G711D module by setting up audio configuration parameters.
G711D::configCodecConfigure G711D module companding algorithm.
G711D::beginStart G711D module audio decoder.
G711D::endStop G711D module audio decoder.

G711D::configAudio

Description
Configure G711D module by setting up audio configuration parameters.

Syntax
void configAudio(AudioSetting& config);

Parameters
config: AudioSetting object containing desired audio configuration.

Returns
NA

Example Code
Example: RTPAudioStream
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Video/examples/Audio/RTPAudioStream/RTPAudioStream.ino)

Notes and Warnings
“AudioDecoder.h” must be included to use the class function. The G711D audio decoder will only work when the audio sample rate is configured as 8kHz or 16kHz.

G711D::configCodec

Description
Configure G711D module companding algorithm.

Syntax
void configCodec(Audio_Codec_T codec);

Parameters
codec: Codec format of audio stream. Valid values: CODEC_G711_PCMU, CODEC_G711_PCMA. Default value of CODEC_G711_PCMU.

Returns
NA

Example Code
Example: RTPAudioStream
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Video/examples/Audio/RTPAudioStream/RTPAudioStream.ino)

Notes and Warnings
“AudioDecoder.h” must be included to use the class function. The G711D audio decoder will only work when the audio sample rate is configured as 8kHz or 16kHz.

G711D::begin

Description
Start G711D audio decoder.

Syntax
void begin(void);

Parameters
NA

Returns
NA

Example Code
Example: RTPAudioStream
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Video/examples/Audio/RTPAudioStream/RTPAudioStream.ino)

Notes and Warnings
“AudioDecoder.h” must be included to use the class function.

G711D::end

Description
Stop G711D audio decoder.

Syntax
void end(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“AudioDecoder.h” must be included to use the class function.

Please confirm that QQ communication software is installed
請先確認已安裝QQ通訊軟體