osxAcousticSL Software Library: D:/Documents/Repositories/DMIC/Private/Fw/OSX_Libraries/Workspace/Middlewares/ST/STM32_OSX_AcousticSL_Library/Inc/osx_acoustic_sl.h Source File

osxAcousticSL

osx_acoustic_sl.h
Go to the documentation of this file.
1 
55 /* Define to prevent recursive inclusion -------------------------------------*/
56 #ifndef __OSX_ACOUSTIC_SL_H
57 #define __OSX_ACOUSTIC_SL_H
58 
59 #include "stdint.h"
60 
61 /* Includes ------------------------------------------------------------------*/
62 /* Exported types ------------------------------------------------------------*/
63 /* Exported constants --------------------------------------------------------*/
64 /* Exported macro ------------------------------------------------------------*/
65 /* Exported define -----------------------------------------------------------*/
66 /* Exported functions ------------------------------------------------------- */
67 
84 #define OSX_ACOUSTIC_SL_ALGORITHM_XCORR 0x00000001
85 #define OSX_ACOUSTIC_SL_ALGORITHM_GCCP 0x00000002
86 #define OSX_ACOUSTIC_SL_ALGORITHM_BMPH 0x00000004
87 
95 #define OSX_ACOUSTIC_SL_ALGORITHM_ERROR 0x00000001
96 #define OSX_ACOUSTIC_SL_PTR_CHANNELS_ERROR 0x00000002
97 #define OSX_ACOUSTIC_SL_CHANNEL_NUMBER_ERROR 0x00000004
98 #define OSX_ACOUSTIC_SL_SAMPLING_FREQ_ERROR 0x00000008
99 #define OSX_ACOUSTIC_SL_RESOLUTION_ERROR 0x00000010
100 #define OSX_ACOUSTIC_SL_THRESHOLD_ERROR 0x00000020
101 #define OSX_ACOUSTIC_SL_DISTANCE_ERROR 0x00000040
102 #define OSX_ACOUSTIC_SL_NUM_OF_SAMPLES_ERROR 0x00000080
103 #define OSX_ACOUSTIC_SL_LOCK_ERROR 0x80000000
104 
107 #define OSX_ACOUSTIC_SL_NO_AUDIO_DETECTED -100
108 
119 typedef struct
120 {
121  uint32_t algorithm;
126  uint32_t channel_number;
128  uint8_t ptr_M1_channels;
129  uint8_t ptr_M2_channels;
130  uint8_t ptr_M3_channels;
131  uint8_t ptr_M4_channels;
133  uint16_t M12_distance;
134  uint16_t M34_distance;
139  uint32_t * pInternalMemory;
143 
147 typedef struct
148 {
149  uint16_t threshold;
150  uint32_t resolution;
152 
153 
168 
176 uint32_t osx_AcousticSL_Init(osx_AcousticSL_Handler_t * pHandler);
177 
193 uint32_t osx_AcousticSL_Data_Input(void *pM1, void *pM2, void *pM3, void *pM4, osx_AcousticSL_Handler_t * pHandler);
194 
201 uint32_t osx_AcousticSL_Process(int32_t * Estimated_Angle, osx_AcousticSL_Handler_t * pHandler);
202 
212 
220 
226 uint32_t osx_AcousticSL_GetLibVersion(char *version);
227 
233 uint32_t osx_AcousticSL_Initialize(void);
234 
245 #endif /* __OSX_ACOUSTIC_SL_H */
246 
247 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
uint32_t sampling_frequency
Definition: osx_acoustic_sl.h:124
uint32_t osx_AcousticSL_Initialize(void)
Unlock the library.
uint32_t osx_AcousticSL_Init(osx_AcousticSL_Handler_t *pHandler)
Library initialization.
uint16_t threshold
Definition: osx_acoustic_sl.h:149
uint8_t ptr_M3_channels
Definition: osx_acoustic_sl.h:130
uint32_t resolution
Definition: osx_acoustic_sl.h:150
int16_t samples_to_process
Definition: osx_acoustic_sl.h:140
uint32_t osx_AcousticSL_Process(int32_t *Estimated_Angle, osx_AcousticSL_Handler_t *pHandler)
Library run function, performs audio analysis when all required data has been collected.
uint32_t osx_AcousticSL_setConfig(osx_AcousticSL_Handler_t *pHandler, osx_AcousticSL_Config_t *pConfig)
Library setup function, it sets the values for threshold and resolution. It can be called at runtime ...
uint32_t algorithm
Definition: osx_acoustic_sl.h:121
Library handler. It keeps track of the static parameters and it handles the internal state of the alg...
Definition: osx_acoustic_sl.h:119
uint16_t M34_distance
Definition: osx_acoustic_sl.h:134
uint32_t osx_AcousticSL_GetLibVersion(char *version)
To be used to retrieve version information.
uint8_t ptr_M2_channels
Definition: osx_acoustic_sl.h:129
uint32_t channel_number
Definition: osx_acoustic_sl.h:126
uint8_t ptr_M1_channels
Definition: osx_acoustic_sl.h:128
uint32_t internal_memory_size
Definition: osx_acoustic_sl.h:136
uint32_t osx_AcousticSL_Data_Input(void *pM1, void *pM2, void *pM3, void *pM4, osx_AcousticSL_Handler_t *pHandler)
Library data input.
uint32_t * pInternalMemory
Definition: osx_acoustic_sl.h:139
uint16_t M12_distance
Definition: osx_acoustic_sl.h:133
uint32_t osx_AcousticSL_getConfig(osx_AcousticSL_Handler_t *pHandler, osx_AcousticSL_Config_t *pConfig)
Fills the pConfig structure with the actual dynamic parameters as they are currently used inside the ...
uint32_t osx_AcousticSL_getMemorySize(osx_AcousticSL_Handler_t *pHandler)
Fills the "internal_memory_size" of the pHandler parameter passed as argument with a value representi...
uint8_t ptr_M4_channels
Definition: osx_acoustic_sl.h:131
Library dynamic configuration handler. It contains dynamic parameters.
Definition: osx_acoustic_sl.h:147
Generated by   doxygen 1.8.11