annotate include/RTAudioSettings.h @ 45:579c86316008 newapi

Major API overhaul. Moved to a single data structure for handling render functions. Functionally, generally similar except for scheduling within PRU loop function, which now uses interrupts from the PRU rather than polling. This requires an updated kernel.
author andrewm
date Thu, 28 May 2015 14:35:55 -0400
parents ad5cd8dd99b3
children
rev   line source
giuliomoro@24 1 /*
giuliomoro@24 2 * RTaudioSettings.h
giuliomoro@24 3 *
giuliomoro@24 4 * Created on: 6 May 2015
giuliomoro@24 5 * Author: unmanaged
giuliomoro@24 6 */
giuliomoro@24 7
giuliomoro@24 8 #ifndef RTAUDIOSETTINGS_H_
giuliomoro@24 9 #define RTAUDIOSETTINGS_H_
giuliomoro@24 10
giuliomoro@24 11 #define MAX_PRU_FILENAME_LENGTH 256
giuliomoro@24 12 #define MAX_SERVERNAME_LENGTH 256
giuliomoro@24 13 // Structure which contains initialisation parameters for the
giuliomoro@24 14 // real-time audio system
giuliomoro@24 15 typedef struct {
giuliomoro@24 16 // These items might be adjusted by the user:
giuliomoro@24 17 int periodSize; // Number of (analog) frames per period; audio is twice this
giuliomoro@24 18 int beginMuted; // Whether to begin with the speakers muted
giuliomoro@24 19 float dacLevel; // Level for the audio DAC output
giuliomoro@24 20 float adcLevel; // Level for the audio ADC input
giuliomoro@24 21 float headphoneLevel; // Level for the headphone output
giuliomoro@24 22 int useAnalog; // Whether to use the analog
giuliomoro@24 23 int useDigital; // Whether to use the 16 programmable GPIOs
giuliomoro@24 24 int numAnalogChannels; // How many channels for the ADC and DAC
giuliomoro@24 25 int numDigitalChannels; // How many channels for the GPIOs
giuliomoro@24 26 int verbose; // Whether to use verbose logging
giuliomoro@24 27 char pruFilename[MAX_PRU_FILENAME_LENGTH]; //the external .bin file to load. If empty will use PRU code from pru_rtaudio_bin.h
giuliomoro@24 28 // These items are hardware-dependent and should only be changed
giuliomoro@24 29 // to run on different hardware
giuliomoro@24 30 int codecI2CAddress; // Where the codec can be found on the I2C bus
giuliomoro@24 31 int ampMutePin; // Pin where amplifier mute can be found
giuliomoro@24 32 int receivePort; //port where the UDP server will listen
giuliomoro@24 33 int transmitPort; //port where the UDP client will transmit
giuliomoro@24 34 char serverName[MAX_SERVERNAME_LENGTH];
giuliomoro@24 35 } RTAudioSettings;
giuliomoro@24 36
giuliomoro@24 37
giuliomoro@24 38
giuliomoro@24 39
giuliomoro@24 40 #endif /* RTAUDIOSETTINGS_H_ */