forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmic.h
More file actions
38 lines (30 loc) · 696 Bytes
/
Copy pathmic.h
File metadata and controls
38 lines (30 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MIC_H
#define MIC_H
#include <Arduino.h>
#include <stdint.h>
// Callback type for audio data
typedef void (*mic_data_handler)(int16_t *data, size_t samples);
/**
* @brief Initialize and start the microphone
* @return true if successful, false otherwise
*/
bool mic_start();
/**
* @brief Stop the microphone
*/
void mic_stop();
/**
* @brief Check if mic is running
* @return true if running
*/
bool mic_is_running();
/**
* @brief Set callback for mic data
* @param callback Function to call when audio data is ready
*/
void mic_set_callback(mic_data_handler callback);
/**
* @brief Process mic data (call from main loop or task)
*/
void mic_process();
#endif // MIC_H