Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Attributes | List of all members
BelaInitSettings Struct Reference

Structure containing initialisation parameters for the real-time audio control system. More...

#include <Bela.h>

Public Attributes

int periodSize
 Number of (analog) frames per period. More...
int useAnalog
 Whether to use the analog input and output.
int useDigital
 Whether to use the 16 programmable GPIOs.
int numAudioInChannels
 How many audio input channels [ignored].
int numAudioOutChannels
 How many audio out channels [ignored].
int numAnalogInChannels
 How many analog input channels.
int numAnalogOutChannels
 How many analog output channels.
int numDigitalChannels
 How many channels for the GPIOs.
int beginMuted
 Whether to begin with the speakers muted.
float dacLevel
 Level for the audio DAC output.
float adcLevel
 Level for the audio ADC input.
float pgaGain [2]
 Gains for the PGA, left and right channels.
float headphoneLevel
 Level for the headphone output.
int numMuxChannels
 How many channels to use on the multiplexer capelet, if enabled.
unsigned int audioExpanderInputs
 Which audio expander settings to use on the input.
unsigned int audioExpanderOutputs
 Which audio expander settings to use on the input.
int pruNumber
 Which PRU (0 or 1) the code should run on.
char pruFilename [MAX_PRU_FILENAME_LENGTH]
 The external .bin file to load. If empty will use PRU code from pru_rtaudio_bin.h.
int detectUnderruns
 Whether to detect and log underruns.
int verbose
 Whether to use verbose logging.
int enableLED
 Whether to use the blinking LED to indicate Bela is running.
int stopButtonPin
int highPerformanceMode
int interleave
 Whether audio/analog data should be interleaved.
int analogOutputsPersist
 Whether analog outputs should persist to future frames. More...
int uniformSampleRate
 Whether the analog channels should be resampled to audio sampling rate.
unsigned int audioThreadStackSize
unsigned int auxiliaryTaskStackSize
bool(* setup )(BelaContext *, void *)
void(* render )(BelaContext *, void *)
void(* cleanup )(BelaContext *, void *)
int ampMutePin
 Pin where amplifier mute can be found.
void(* audioThreadDone )(BelaContext *, void *)
int unused1
char unused2 [MAX_UNUSED2_LENGTH]
BelaHw board
 User selected board to work with (as opposed to detected hardware).
char * projectName
 Name of running project.

Detailed Description

Structure containing initialisation parameters for the real-time audio control system.

This structure is initialised using Bela_defaultSettings(). Its contents are used up through the point of calling Bela_initAudio() at which point it is no longer needed.


Member Data Documentation

int BelaInitSettings::periodSize

Number of (analog) frames per period.

Number of audio frames depends on relative sample rates of the two. By default, audio is twice the sample rate, so has twice the period size.

int BelaInitSettings::stopButtonPin

What GPIO pin to monitor for stopping the program. Defaults to 115 (button on P9.27/P2.34/GPIO3[19]). Pass -1 to disable monitoring.

int BelaInitSettings::highPerformanceMode

Whether to use high-performance mode: gives more CPU to the Bela task. The Linux part of the board and the IDE may freeze while the program is running. Use the button on the Bela cape to forcefully stop the running program

int BelaInitSettings::analogOutputsPersist

Whether analog outputs should persist to future frames.

n.b. digital pins always persist, audio never does

void(* BelaInitSettings::audioThreadDone)(BelaContext *, void *)

Pointer to an optional function to be called when the audio thread is done. This function is called from the audio thread itself just before it returns.

The documentation for this struct was generated from the following file: