FrontEnd Class Definitions. More...
#include <FrontEnd.h>
Public Member Functions | |
err_t | begin (void) |
Initialize the FrontEnd. More... | |
err_t | begin (AudioAttentionCb attcb) |
Initialize the FrontEnd. More... | |
err_t | end (void) |
Finalize the FrontEnd. More... | |
err_t | activate (void) |
Activate the FrontEnd. More... | |
err_t | activate (MicFrontendCallback fedcb) |
Activate the FrontEnd. More... | |
err_t | activate (MicFrontendCallback fedcb, bool is_digital) |
err_t | init (uint8_t channel_number, uint8_t bit_length, uint32_t samples_per_frame, uint8_t data_path, AsDataDest dest) |
Initialize the FrontEnd. More... | |
err_t | start (void) |
Start FrontEnd. More... | |
err_t | stop (void) |
Stop Recording. More... | |
err_t | initpreproc (AsInitPreProcParam *param) |
Send init command to pre-process DSP. More... | |
err_t | setpreproc (AsSetPreProcParam *param) |
Send init command to pre-process DSP. More... | |
err_t | setMicGain (int16_t mic_gain) |
Set Mic gain. More... | |
err_t | setCapturingClkMode (uint8_t clk_mode) |
Set capturing clock mode. More... | |
err_t | deactivate (void) |
Deactivate the FrontEnd. More... | |
Static Public Member Functions | |
static FrontEnd * | getInstance () |
Get instance of FrontEnd for singleton. | |
FrontEnd Class Definitions.
err_t FrontEnd::begin | ( | void | ) |
err_t FrontEnd::begin | ( | AudioAttentionCb | attcb | ) |
Initialize the FrontEnd.
This function can set callback funtion which receive attention notify.
err_t FrontEnd::end | ( | void | ) |
Finalize the FrontEnd.
This function is called only once when finish the MediaRecorder.
err_t FrontEnd::activate | ( | void | ) |
Activate the FrontEnd.
This function activates frontend system and audio HW. You can specify pre-process type.
err_t FrontEnd::activate | ( | MicFrontendCallback | fedcb | ) |
Activate the FrontEnd.
This function activates frontend system and audio HW. You can specify preproces type. If you activate FrontEnd by this API, The result of all APIs will be returnd by callback function which is specified by this function. (It means that the return of API is not completion of internal process)
err_t FrontEnd::init | ( | uint8_t | channel_number, |
uint8_t | bit_length, | ||
uint32_t | samples_per_frame, | ||
uint8_t | data_path, | ||
AsDataDest | dest | ||
) |
Initialize the FrontEnd.
This is full version on initialize API. In this API, you can should set all of initialize parameters. Before you start FrontEnd, you must initialize by this API.
channel_number | Set chennel number. AS_CHANNEL_MONO or AS_CHANNEL_STEREO, 2CH, 4CH, 8CH |
bit_length | Set bit length. AS_BITLENGTH_16 or AS_BITLENGTH_24 |
samples_per_frame | Number of Samples per one frame |
data_path | Set capture data path. AsDataPathCallback or AsDataPathMessage |
dest | Destination of outgoing data from FrontEnd |
err_t FrontEnd::start | ( | void | ) |
err_t FrontEnd::stop | ( | void | ) |
err_t FrontEnd::initpreproc | ( | AsInitPreProcParam * | param | ) |
Send init command to pre-process DSP.
This function sends Init command to pre-process DSP.
param | Init command packet parameter for pre-process DSP |
err_t FrontEnd::setpreproc | ( | AsSetPreProcParam * | param | ) |
Send init command to pre-process DSP.
This function sends Set command to pre-process DSP.
param | Set command packet parameter for pre-process DSP |
err_t FrontEnd::setMicGain | ( | int16_t | mic_gain | ) |
Set Mic gain.
The gain set when microphone is used can be specified by the "mic_gain" argument. You can set every 0.5 dB between 0 dB and 21 dB. In this parameter, a value from 0 to 210 is set for every 5.
mic_gain | Input gain : value range Analog Mic 0:0dB, 5:+0.5dB, ... , 210:+21.0dB (Max is 21dB.) Digital Mic -7850:-78.50dB, ... , -5:-0.05dB, 0:0dB (Max is 0dB.) set #AS_MICGAIN_HOLD is keep setting. |
err_t FrontEnd::setCapturingClkMode | ( | uint8_t | clk_mode | ) |
Set capturing clock mode.
This API set internal audio capture 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. FRONTEND_CAPCLK_NORMAL, FRONTEND_CAPCLK_HIRESO |
err_t FrontEnd::deactivate | ( | void | ) |