Bela
|
Structure holding current audio and sensor settings and pointers to data buffers. More...
#include <Bela.h>
Public Attributes | |
const float *const | audioIn |
Buffer holding audio input samples. More... | |
float *const | audioOut |
Buffer holding audio output samples. More... | |
const float *const | analogIn |
Buffer holding analog input samples. More... | |
float *const | analogOut |
Buffer holding analog output samples. More... | |
uint32_t *const | digital |
Buffer holding digital input/output samples. More... | |
const uint32_t | audioFrames |
Number of audio frames per period. | |
const uint32_t | audioInChannels |
Number of input audio channels. | |
const uint32_t | audioOutChannels |
Number of output audio channels. | |
const float | audioSampleRate |
Audio sample rate in Hz (currently always 44100.0) | |
const uint32_t | analogFrames |
Number of analog frames per period. More... | |
const uint32_t | analogInChannels |
Number of input analog channels. More... | |
const uint32_t | analogOutChannels |
Number of output analog channels. More... | |
const float | analogSampleRate |
Analog sample rate in Hz. More... | |
const uint32_t | digitalFrames |
Number of digital frames per period. | |
const uint32_t | digitalChannels |
Number of digital channels. More... | |
const float | digitalSampleRate |
Digital sample rate in Hz (currently always 44100.0) | |
const uint64_t | audioFramesElapsed |
Number of elapsed audio frames since the start of rendering. More... | |
const uint32_t | flags |
Other audio/sensor settings. More... | |
Detailed Description
Structure holding current audio and sensor settings and pointers to data buffers.
This structure is passed to setup(), render() and cleanup(). It is initialised in Bela_initAudio() based on the contents of the BelaInitSettings structure.
- Examples:
- analog-input/render.cpp, analog-output/render.cpp, capacitive-touch/render.cpp, digital-input/render.cpp, digital-output/render.cpp, FFT-audio-in/render.cpp, FFT-phase-vocoder/render.cpp, filter-FIR/render.cpp, filter-IIR/render.cpp, logging-sensors/render.cpp, minimal/render.cpp, OSC/render.cpp, oscillator-bank/render.cpp, passthrough/render.cpp, samples/render.cpp, scope-analog/render.cpp, scope/render.cpp, sinetone/render.cpp, tremolo/render.cpp, userdata/render.cpp, and write-file/render.cpp.
Member Data Documentation
const float* const BelaContext::audioIn |
Buffer holding audio input samples.
This buffer may be in either interleaved or non-interleaved format, depending on the contents of the BelaInitSettings structure. Note: this element is available in render() only.
- Examples:
- FFT-audio-in/render.cpp, and write-file/render.cpp.
float* const BelaContext::audioOut |
Buffer holding audio output samples.
This buffer may be in either interleaved or non-interleaved format, depending on the contents of the BelaInitSettings structure. Note: this element is available in render() only.
const float* const BelaContext::analogIn |
Buffer holding analog input samples.
This buffer may be in either interleaved or non-interleaved format, depending on the contents of the BelaInitSettings structure. Note: this element is available in render() only.
- Examples:
- logging-sensors/render.cpp, and oscillator-bank/render.cpp.
float* const BelaContext::analogOut |
Buffer holding analog output samples.
This buffer may be in either interleaved or non-interleaved format, depending on the contents of the BelaInitSettings structure. Note: this element is available in render() only.
uint32_t* const BelaContext::digital |
Buffer holding digital input/output samples.
Note: this element is available in render() only.
const uint32_t BelaContext::analogFrames |
Number of analog frames per period.
This will be 0 if analog I/O is disabled.
const uint32_t BelaContext::analogInChannels |
Number of input analog channels.
This will be 0 if analog I/O is disabled.
const uint32_t BelaContext::analogOutChannels |
Number of output analog channels.
This will be 0 if analog I/O is disabled.
- Examples:
- analog-output/render.cpp, and tremolo/render.cpp.
const float BelaContext::analogSampleRate |
Analog sample rate in Hz.
The analog sample rate depends on the number of analog channels used. If 8 channels are used, the sample rate is 22050. If 4 channels are used, the sample rate is 44100. If 2 channels are used, the sample rate is 88200. If analog I/O is disabled, the sample rate is 0.
- Examples:
- analog-output/render.cpp.
const uint32_t BelaContext::digitalChannels |
Number of digital channels.
Currently this will always be 16, unless digital I/O is disabled, in which case it will be 0.
const uint64_t BelaContext::audioFramesElapsed |
Number of elapsed audio frames since the start of rendering.
This holds the total number of audio frames as of the beginning of the current period. To find the current number of analog or digital frames elapsed, multiply by the ratio of the sample rates (e.g. half the number of analog frames will have elapsed if the analog sample rate is 22050).
const uint32_t BelaContext::flags |
Other audio/sensor settings.
Binary combination of flags including:
BELA_FLAG_INTERLEAVED: indicates the audio and analog buffers are interleaved
BELA_FLAG_ANALOG_OUTPUTS_PERSIST: indicates that writes to the analog outputs will persist for future frames. If not set, writes affect one frame only.
The documentation for this struct was generated from the following file:
Generated on Sun Dec 22 2024 06:28:13 for Bela by 1.8.11