-
Notifications
You must be signed in to change notification settings - Fork 1
/
beat.h
34 lines (26 loc) · 767 Bytes
/
beat.h
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
#ifndef __BEAT_H
#define __BEAT_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Check if beat detection function is busy or not.
*/
bool Beat_isIdle(void);
/* The function will examine the input array to analyze whether there is
* onset in the array using an external library Aubio. If there happens
* to be beats in the array, it will call enqueue beat function defined in
* Game module.
*
* Some part of this function is adapted from the official documentation
* of the library.
* Please check this link for details: https://aubio.org/doc/latest/examples_2aubioonset_8c-example.html
*
* Parameter: a pointer to a float array
*/
void Beat_enqueueIfIsBeat(float* frame);
void Beat_init(void);
#ifdef __cplusplus
}
#endif
#endif