Mercurial > hg > beaglert
comparison include/RTAudio.h @ 24:ad5cd8dd99b3 bbb_network
UDP communication in place, pre-alpha
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 08 May 2015 11:12:13 +0100 |
parents | c98863e63174 |
children |
comparison
equal
deleted
inserted
replaced
23:182ae9367104 | 24:ad5cd8dd99b3 |
---|---|
11 */ | 11 */ |
12 | 12 |
13 | 13 |
14 #ifndef RTAUDIO_H_ | 14 #ifndef RTAUDIO_H_ |
15 #define RTAUDIO_H_ | 15 #define RTAUDIO_H_ |
16 | 16 #include "RTAudioSettings.h" |
17 #include "render.h" | 17 #include "render.h" |
18 | 18 |
19 // Useful constants | 19 // Useful constants |
20 #define DBOX_CAPE // New custom cape | 20 #define DBOX_CAPE // New custom cape |
21 | 21 |
27 | 27 |
28 // Default volume levels | 28 // Default volume levels |
29 #define DEFAULT_DAC_LEVEL 0.0 | 29 #define DEFAULT_DAC_LEVEL 0.0 |
30 #define DEFAULT_ADC_LEVEL -6.0 | 30 #define DEFAULT_ADC_LEVEL -6.0 |
31 #define DEFAULT_HP_LEVEL -6.0 | 31 #define DEFAULT_HP_LEVEL -6.0 |
32 #define MAX_PRU_FILENAME_LENGTH 256 | |
33 | 32 |
34 enum { | 33 enum { |
35 kAmplifierMutePin = 61 // P8-26 controls amplifier mute | 34 kAmplifierMutePin = 61 // P8-26 controls amplifier mute |
36 }; | 35 }; |
37 | |
38 // Structure which contains initialisation parameters for the | |
39 // real-time audio system | |
40 typedef struct { | |
41 // These items might be adjusted by the user: | |
42 int periodSize; // Number of (analog) frames per period; audio is twice this | |
43 int beginMuted; // Whether to begin with the speakers muted | |
44 float dacLevel; // Level for the audio DAC output | |
45 float adcLevel; // Level for the audio ADC input | |
46 float headphoneLevel; // Level for the headphone output | |
47 int useAnalog; // Whether to use the analog | |
48 int useDigital; // Whether to use the 16 programmable GPIOs | |
49 int numAnalogChannels; // How many channels for the ADC and DAC | |
50 int numDigitalChannels; // How many channels for the GPIOs | |
51 int verbose; // Whether to use verbose logging | |
52 char pruFilename[MAX_PRU_FILENAME_LENGTH]; //the external .bin file to load. If empty will use PRU code from pru_rtaudio_bin.h | |
53 // These items are hardware-dependent and should only be changed | |
54 // to run on different hardware | |
55 int codecI2CAddress; // Where the codec can be found on the I2C bus | |
56 int ampMutePin; // Pin where amplifier mute can be found | |
57 } RTAudioSettings; | |
58 | 36 |
59 typedef void* AuxiliaryTask; // Opaque data type to keep track of aux tasks | 37 typedef void* AuxiliaryTask; // Opaque data type to keep track of aux tasks |
60 | 38 |
61 // Flag that indicates when the audio will stop; can be read or | 39 // Flag that indicates when the audio will stop; can be read or |
62 // set by other components which should end at the same time as the audio | 40 // set by other components which should end at the same time as the audio |