~yschatzb/mixxx/1.11-yoav-bugfixing

« back to all changes in this revision

Viewing changes to mixxx/mixxx/defs.h

  • Committer: tuehaste
  • Date: 2002-02-26 11:12:07 UTC
  • Revision ID: vcs-imports@canonical.com-20020226111207-5rly26cj9gdd19ba
Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DEFS_H
 
2
#define DEFS_H
 
3
 
 
4
#include <math.h>
 
5
#include <iostream>
 
6
#include <stdlib.h>
 
7
 
 
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
 
19
 
 
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));
 
25
 
 
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;
 
37
 
 
38
#endif