AcousticSL Software Library: D:/Documents/Repositories/DMIC/Private/Fw/OSX_Libraries/SourceLocalization/trunk/export/acoustic_sl.h Source File

STM32 Acoustic SL

acoustic_sl.h
Go to the documentation of this file.
1 
57 /* Define to prevent recursive inclusion -------------------------------------*/
58 #ifndef __ACOUSTIC_SL_H
59 #define __ACOUSTIC_SL_H
60 
61 #include "stdint.h"
62 
63 /* Includes ------------------------------------------------------------------*/
64 /* Exported types ------------------------------------------------------------*/
65 /* Exported constants --------------------------------------------------------*/
66 /* Exported macro ------------------------------------------------------------*/
67 /* Exported define -----------------------------------------------------------*/
68 /* Exported functions ------------------------------------------------------- */
69 
86 #define ACOUSTIC_SL_ALGORITHM_XCORR ((uint32_t)0x00000001)
87 #define ACOUSTIC_SL_ALGORITHM_GCCP ((uint32_t)0x00000002)
88 #define ACOUSTIC_SL_ALGORITHM_BMPH ((uint32_t)0x00000004)
89 
97 #define ACOUSTIC_SL_ALGORITHM_ERROR ((uint32_t)0x00000001)
98 #define ACOUSTIC_SL_PTR_CHANNELS_ERROR ((uint32_t)0x00000002)
99 #define ACOUSTIC_SL_CHANNEL_NUMBER_ERROR ((uint32_t)0x00000004)
100 #define ACOUSTIC_SL_SAMPLING_FREQ_ERROR ((uint32_t)0x00000008)
101 #define ACOUSTIC_SL_RESOLUTION_ERROR ((uint32_t)0x00000010)
102 #define ACOUSTIC_SL_THRESHOLD_ERROR ((uint32_t)0x00000020)
103 #define ACOUSTIC_SL_DISTANCE_ERROR ((uint32_t)0x00000040)
104 #define ACOUSTIC_SL_NUM_OF_SAMPLES_ERROR ((uint32_t)0x00000080)
105 #define ACOUSTIC_SL_PROCESSING_ERROR ((uint32_t)0x00000100)
106 
107 #ifndef ACOUSTIC_LOCK_ERROR
108 #define ACOUSTIC_LOCK_ERROR ((uint32_t)0x10000000)
109 #endif
110 
113 #define ACOUSTIC_SL_NO_AUDIO_DETECTED -100
114 
125 typedef struct
126 {
127  uint32_t algorithm;
132  uint32_t channel_number;
134  uint8_t ptr_M1_channels;
135  uint8_t ptr_M2_channels;
136  uint8_t ptr_M3_channels;
137  uint8_t ptr_M4_channels;
139  uint16_t M12_distance;
140  uint16_t M34_distance;
145  uint32_t * pInternalMemory;
149 
153 typedef struct
154 {
155  uint16_t threshold;
156  uint32_t resolution;
158 
159 
174 
182 uint32_t AcousticSL_Init(AcousticSL_Handler_t * pHandler);
183 
199 uint32_t AcousticSL_Data_Input(void *pM1, void *pM2, void *pM3, void *pM4, AcousticSL_Handler_t * pHandler);
200 
207 uint32_t AcousticSL_Process(int32_t * Estimated_Angle, AcousticSL_Handler_t * pHandler);
208 
217 uint32_t AcousticSL_setConfig(AcousticSL_Handler_t * pHandler, AcousticSL_Config_t * pConfig);
218 
225 uint32_t AcousticSL_getConfig(AcousticSL_Handler_t * pHandler, AcousticSL_Config_t * pConfig);
226 
232 uint32_t AcousticSL_GetLibVersion(char *version);
233 
234 
245 #endif /* __ACOUSTIC_SL_H */
246 
247 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
uint32_t AcousticSL_Data_Input(void *pM1, void *pM2, void *pM3, void *pM4, AcousticSL_Handler_t *pHandler)
Library data input.
uint32_t internal_memory_size
Definition: acoustic_sl.h:142
uint8_t ptr_M1_channels
Definition: acoustic_sl.h:134
uint8_t ptr_M4_channels
Definition: acoustic_sl.h:137
uint16_t threshold
Definition: acoustic_sl.h:155
uint32_t channel_number
Definition: acoustic_sl.h:132
uint32_t * pInternalMemory
Definition: acoustic_sl.h:145
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 ...
uint8_t ptr_M3_channels
Definition: acoustic_sl.h:136
uint16_t M34_distance
Definition: acoustic_sl.h:140
uint8_t ptr_M2_channels
Definition: acoustic_sl.h:135
uint32_t AcousticSL_GetLibVersion(char *version)
To be used to retrieve version information.
int16_t samples_to_process
Definition: acoustic_sl.h:146
Library handler. It keeps track of the static parameters and it handles the internal state of the alg...
Definition: acoustic_sl.h:125
Library dynamic configuration handler. It contains dynamic parameters.
Definition: acoustic_sl.h:153
uint32_t AcousticSL_Init(AcousticSL_Handler_t *pHandler)
Library initialization.
uint32_t AcousticSL_getMemorySize(AcousticSL_Handler_t *pHandler)
Fills the "internal_memory_size" of the pHandler parameter passed as argument with a value representi...
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.
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 ...
uint16_t M12_distance
Definition: acoustic_sl.h:139
uint32_t algorithm
Definition: acoustic_sl.h:127
uint32_t resolution
Definition: acoustic_sl.h:156
uint32_t sampling_frequency
Definition: acoustic_sl.h:130
Generated by   doxygen 1.8.11