8
typedef short int SAMPLE; // Data type used in output buffer. S16_LE works on SB/ALSA.
9
const int SAMPLE_SIZE = 2; // Number of bytes used to store 1 sample
10
typedef double CSAMPLE; // CSAMPLE defines the CSAMPLE type used for
11
// intermidiate calculations
12
typedef CSAMPLE FLOAT; // Float type, used for non sample data
13
static int SRATE = 44100; // Sample rate
14
const int BUFFER_SIZE = 1024; // Buffer size used both for input and output
15
const int READAHEAD = 150; // how many buffers to read ahead.
16
const int READCHUNKSIZE = 1500000; // size of the chunk that's read in every read.
17
const int READBUFFERSIZE = 2*READCHUNKSIZE; // size of read buffer.
18
const int NO_CHANNELS = 2; // 2 for stereo
20
// Various fixed constants
21
static int NYQUIST = SRATE/2;
22
static CSAMPLE norm = (2*acos(-1.0))/SRATE;
23
static CSAMPLE pi = acos(-1.0);
24
static CSAMPLE two_pi = (2*acos(-1.0));
26
// Defs for the ports and their midi control values:
27
const short ADC0 = 0x00;
28
const short ADC1 = 0x08;
29
const short ADC2 = 0x10;
30
const short ADC3 = 24 ;
31
const short ADC4 = 32 ;
32
const short ADC5 = 40 ;
33
const short ADC6 = 0x30;
34
const short ADC7 = 0x38;
35
const short PORT_B = 1;
36
const short PORT_D = 3;