CjAudioCapture
cj_audio_capture.h
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Seajei, LLC. All rights reserved.
3 //
4 
11 #ifndef CJ_AUDIO_CAPTURE_H_
12 #define CJ_AUDIO_CAPTURE_H_
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include <stdio.h>
19 #include <stdint.h>
20 #include <stdbool.h>
21 
27 typedef void (*cj_ac_audio_frames_captured_handler)(short *audioFrames, size_t audioFramesLen);
28 
35 void cj_ac_init(int sampleRate, int frameSize, cj_ac_audio_frames_captured_handler audioFramesCapturedHandler);
36 
40 void cj_ac_deinit(void);
41 
45 void cj_ac_start(void);
46 
50 void cj_ac_stop(void);
51 
56 void cj_ac_pause(void);
57 
61 void cj_ac_resume(void);
62 
66 bool cj_ac_is_paused(void);
67 
72 void cj_ac_process_main_loop(void);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif // CJ_AUDIO_CAPTURE_H_
bool cj_ac_is_paused(void)
Check if frame capturing is paused.
void cj_ac_process_main_loop(void)
This function needs to be called regularly for the library to function.
void cj_ac_start(void)
Start capturing frames.
void(* cj_ac_audio_frames_captured_handler)(short *audioFrames, size_t audioFramesLen)
Callback delivers audio frames as they get captured.
Definition: cj_audio_capture.h:27
void cj_ac_stop(void)
Stop capturing frames.
void cj_ac_resume(void)
Resume capturing frames.
void cj_ac_deinit(void)
Deinitializes the library.
void cj_ac_init(int sampleRate, int frameSize, cj_ac_audio_frames_captured_handler audioFramesCapturedHandler)
Initializes library.
void cj_ac_pause(void)
Pause capturing frames.