AcousticSL Software Library
|
AcousticSL Exported Functions
Functions | |
uint32_t | AcousticSL_getMemorySize (AcousticSL_Handler_t *pHandler) |
Fills the "internal_memory_size" of the pHandler parameter passed as argument with a value representing the right amount of memory needed by the library, depending on the specific static parameters adopted. More... | |
uint32_t | AcousticSL_Init (AcousticSL_Handler_t *pHandler) |
Library initialization. More... | |
uint32_t | AcousticSL_Data_Input (void *pM1, void *pM2, void *pM3, void *pM4, AcousticSL_Handler_t *pHandler) |
Library data input. More... | |
uint32_t | AcousticSL_Process (int32_t *Estimated_Angle, AcousticSL_Handler_t *pHandler) |
Library run function, performs audio analysis when all required data has been collected. More... | |
uint32_t | AcousticSL_setConfig (AcousticSL_Handler_t *pHandler, AcousticSL_Config_t *pConfig) |
Library setup function, it sets the values for threshold and resolution. It can be called at runtime to change dynamic parameters. More... | |
uint32_t | AcousticSL_getConfig (AcousticSL_Handler_t *pHandler, AcousticSL_Config_t *pConfig) |
Fills the pConfig structure with the actual dynamic parameters as they are currently used inside the library. More... | |
uint32_t | AcousticSL_GetLibVersion (char *version) |
To be used to retrieve version information. More... | |
Detailed Description
Function Documentation
uint32_t AcousticSL_Data_Input | ( | void * | pM1, |
void * | pM2, | ||
void * | pM3, | ||
void * | pM4, | ||
AcousticSL_Handler_t * | pHandler | ||
) |
Library data input.
- Parameters
-
pM1 pointer to an array that contains PCM samples (16 bit signed int) representing 1 ms of data acquired by the first channel. pM2 pointer to an array that contains PCM samples (16 bit signed int) representing 1 ms of data acquired by the second channel. pM3 pointer to an array that contains PCM samples (16 bit signed int) representing 1 ms of data acquired by the third channel. pM4 pointer to an array that contains PCM samples (16 bit signed int) representing 1 ms of data acquired by the fourth channel. pHandler pointer to the handler of the curent Source Localization instance running.
- Return values
-
1 if data collection is finished and libSoundSourceLoc_Process must be called, 0 otherwise.
- Note
- Input function reads samples skipping the required number of values depending on the Ptr_Mx_Channels configuration.
- pM3 and pM4 are ignored in the case the library is setup for using 2 channels.
uint32_t AcousticSL_getConfig | ( | AcousticSL_Handler_t * | pHandler, |
AcousticSL_Config_t * | pConfig | ||
) |
Fills the pConfig structure with the actual dynamic parameters as they are currently used inside the library.
- Parameters
-
pHandler pointer to the handler of the current Source Localization instance running. pConfig pointer to the dynamic parameters handler that will be filled with the current library configuration
- Return values
-
0 if everything is fine.
uint32_t AcousticSL_GetLibVersion | ( | char * | version | ) |
To be used to retrieve version information.
- Parameters
-
version char array to be filled with the current library version
- Return values
-
0 if everything is fine.
uint32_t AcousticSL_getMemorySize | ( | AcousticSL_Handler_t * | pHandler | ) |
Fills the "internal_memory_size" of the pHandler parameter passed as argument with a value representing the right amount of memory needed by the library, depending on the specific static parameters adopted.
- Parameters
-
pHandler AcousticSL_Handler_t filled with desired parameters.
- Return values
-
0 if everything is fine.
uint32_t AcousticSL_Init | ( | AcousticSL_Handler_t * | pHandler | ) |
Library initialization.
- Parameters
-
pHandler AcousticSL_Handler_t filled with desired parameters.
- Return values
-
0 if everything is fine. different from 0 if erroneous parameters have been passed to the Init function and the default value has been used. The specific error can be recognized by checking the relative bit in the returned word.
uint32_t AcousticSL_Process | ( | int32_t * | Estimated_Angle, |
AcousticSL_Handler_t * | pHandler | ||
) |
Library run function, performs audio analysis when all required data has been collected.
- Parameters
-
Estimated_Angle pointer to the int32_t variable that will contain the computed value. pHandler pointer to the handler of the current Source Localization instance running.
- Return values
-
0 if everything is ok, 1 otherwise
uint32_t AcousticSL_setConfig | ( | AcousticSL_Handler_t * | pHandler, |
AcousticSL_Config_t * | pConfig | ||
) |
Library setup function, it sets the values for threshold and resolution. It can be called at runtime to change dynamic parameters.
- Note
- Only the threshold and resolution are evaluated by the SetConfig function.
- Return values
-
0 if everything is fine. different from 0 if erroneous parameters have been passed to the Init function and the default value has been used. The specific error can be recognized by checking the relative bit in the returned word.
Generated by
