OutputMixer Class Definitions. More...
#include <OutputMixer.h>
Public Member Functions | |
err_t | begin (void) |
Initialize the OutputMixer. More... | |
err_t | end (void) |
Finalize the OutputMixer. More... | |
err_t | create (void) |
Creation of the OutputMixer. More... | |
err_t | create (AudioAttentionCb attcb) |
Creation of the OutputMixer. More... | |
err_t | activate (AsOutputMixerHandle handle, OutputMixerCallback omcb) |
Activate the OutputMixer. More... | |
err_t | activate (AsOutputMixerHandle handle, uint8_t output_device, OutputMixerCallback omcb) |
Activate the OutputMixer with specify output device. More... | |
err_t | sendData (AsOutputMixerHandle handle, PcmProcDoneCallback pcmdone_cb, AsPcmDataParam pcm) |
Send PCM data via OutputMixer. More... | |
err_t | deactivate (AsOutputMixerHandle handle) |
Deactivate the OutputMixer. More... | |
err_t | activateBaseband (void) |
Activate Audio Hw. More... | |
err_t | deactivateBaseband (void) |
Deactivate Audio Hw. More... | |
err_t | setVolume (int master, int player0, int player1) |
Set speaker out volume. More... | |
bool | setRenderingClkMode (uint8_t clk_mode) |
Set Rendering clock mode. More... | |
Static Public Member Functions | |
static OutputMixer * | getInstance () |
Get instance of MediaRecorder for singleton. | |
OutputMixer Class Definitions.
|
inline |
Initialize the OutputMixer.
This function activates Audio HW.
|
inline |
Finalize the OutputMixer.
This function deactivates output mixer system.
err_t OutputMixer::create | ( | void | ) |
Creation of the OutputMixer.
This function is called only once when using the OutputMixer. In this function, create objcets for audio data mixing and rendering.
err_t OutputMixer::create | ( | AudioAttentionCb | attcb | ) |
Creation of the OutputMixer.
This function can set callback funtion which receive attention notify.
err_t OutputMixer::activate | ( | AsOutputMixerHandle | handle, |
OutputMixerCallback | omcb | ||
) |
Activate the OutputMixer.
This function activates output mixer system. The result of APIs will be returnd by callback function which is specified by this function. Output device is speaker output fixed.
handle | Select output mixer handle. OutputMixer0 or OutputMixer1 |
omcb | Sepcify callback function which is called to notify API results. |
err_t OutputMixer::activate | ( | AsOutputMixerHandle | handle, |
uint8_t | output_device, | ||
OutputMixerCallback | omcb | ||
) |
Activate the OutputMixer with specify output device.
This function activates output mixer system. The result of APIs will be returnd by callback function which is specified by this function. This I/F can specify output device as speaker or i2s.
handle | Select output mixer handle. OutputMixer0 or OutputMixer1 |
output_device | Select output device. HPOutputDevice or I2SOutputDevice |
omcb | Sepcify callback function which is called to notify API results. |
err_t OutputMixer::sendData | ( | AsOutputMixerHandle | handle, |
PcmProcDoneCallback | pcmdone_cb, | ||
AsPcmDataParam | pcm | ||
) |
Send PCM data via OutputMixer.
This function send PCM data. According to "pcm" paramters, start sending PCM data. When send complete, callback function "pcmdome_cb" will be called.
handle | Select output mixer handle. OutputMixer0 or OutputMixer1 |
pcmdone_cb | Callback function which will be called when send complete |
pcm | PCM data parameters |
err_t OutputMixer::deactivate | ( | AsOutputMixerHandle | handle | ) |
Deactivate the OutputMixer.
This function deactivates output mixer system.
handle | Select output mixer handle. OutputMixer0 or OutputMixer1 |
err_t OutputMixer::activateBaseband | ( | void | ) |
Activate Audio Hw.
This function activates Audio HW. You must call this API to sound.
err_t OutputMixer::deactivateBaseband | ( | void | ) |
Deactivate Audio Hw.
This function deactivates output mixer system.
err_t OutputMixer::setVolume | ( | int | master, |
int | player0, | ||
int | player1 | ||
) |
Set speaker out volume.
This function set volume. You should activate baseband before this API call.
master | Master volume. -1020(-102db) - 120(12db) |
player0 | Player0 volume. -1020(-102db) - 120(12db) |
player1 | Plyaer1 volume. -1020(-102db) - 120(12db) |
bool OutputMixer::setRenderingClkMode | ( | uint8_t | clk_mode | ) |
Set Rendering clock mode.
This API set internal audio renderer clock mode to Normal(48kHz) or HiReso(192kHz). Default on boot is Normal, if you set HiReso, call this API with HiReso set.
clk_mode | Set clock mode. OUTPUTMIXER_RNDCLK_NORMAL, OUTPUTMIXER_RNDCLK_HIRESO |