-
Notifications
You must be signed in to change notification settings - Fork 0
/
buf.h
37 lines (31 loc) · 770 Bytes
/
buf.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
35
36
37
// Gregor McWilliam -- gbm5862
#ifndef BUF_H_
#define BUF_H_
#include <stdlib.h>
#include <sndfile.h>
#include <portaudio.h>
#include <stdatomic.h>
#include "paUtils.h"
#define MAX_ROUNDS 100
#define MAX_PATH_LEN 256
#define MAX_FILES 8
#define MAX_CHAN 2
#define FRAMES_PER_BUFFER 1024
#define DEBUG 0
#define MAX_LEN 100
// Buf struct
typedef struct {
atomic_int selection;
unsigned int channels;
unsigned int samplerate;
float *x[MAX_FILES];
unsigned long frames[MAX_FILES];
unsigned long next_frame[MAX_FILES];
unsigned long round;
int gameArray[MAX_ROUNDS];
int playback;
int curRound;
int readyForUserInput;
int notification;
} Buf;
#endif /* BUF_H_ */