AuxPort 0.2
Modules for Audio Software Development
|
Buffer is a Generic Audio Buffer class that is a container for floating or integer type Audio Buffers. More...
#include <AuxBuffer.h>
Public Member Functions | |
Buffer ()=default | |
Initializes the class. | |
Buffer (const sample *array, const size_t &size) | |
Initializes Buffer with an array. | |
Buffer (const std::vector< sample > &buffer) | |
Initializes Buffer with an std::vector. | |
Buffer (const Buffer< sample > &newBuffer) | |
Initializes Buffer with another Buffer. | |
~Buffer () | |
Safely Deallocates memory and destroys the Buffer | v1.0. | |
const sample & | get (const size_t &index) const |
Returns a sample value at the provided index on the Buffer. | |
const sample & | operator[] (const size_t &index) const |
Returns a sample value at the provided index on the Buffer. | |
void | set (const sample &value, const size_t &index) |
Sets the sample to the specified index. | |
void | replace (const sample *buffer, const size_t &size) |
Replaces the audio buffer with a buffer pointer. | |
void | replace (const std::vector< sample > &buffer) |
Replaces the audio buffer with a std::vector. | |
void | replace (const AuxPort::Audio::Buffer< sample > &buffer) |
Replaces the audio buffer with a std::vector. | |
void | add (const sample &value) |
Adds a constant to every single value of the Audio Buffer. | |
void | add (const sample &value, size_t index) |
Adds coefficient to the value in the Audio Buffer at the specified "index". | |
void | add (const std::vector< sample > &buffer) |
of std::vector to the Audio Buffer | |
void | add (sample *buffer, const size_t &size) |
Addition of values in a C-Style array to the Audio Buffer. | |
void | add (const AuxPort::Audio::Buffer< sample > &buffer) |
Addition of Two Audio Buffers. | |
void | multiply (const sample &value) |
Multiplies coefficient to every single value of the Audio Buffer. | |
void | multiply (const sample &value, const size_t &index) |
Multiplies coefficient to the value in the Audio Buffer at the specified "index". | |
void | divide (const sample &value) |
Divides coefficient from every single value of the Audio Buffer. | |
void | divide (const sample &value, const size_t &index) |
Performs division between the value in the Audio Buffer at the specified "index" and the "value" passed. | |
void | subtract (const sample &value) |
Subtracts coefficient from every single value of the Audio Buffer. | |
void | subtract (const sample &value, size_t index) |
Performs subtraction between the value in the Audio Buffer at the specified "index" and the "value" passed. | |
void | resize (const size_t &size) |
Resizes the audio buffer to the size given in the argument. | |
double | getRMS (bool dBFS=true) const |
Calculates the RMS in Linear/dbFS. | |
size_t | size () const |
Returns Size of Buffer. | |
void | Log () override |
Overloaded AuxPort::ILog::Log. | |
void | operator= (const Buffer< sample > &buffer) |
Overloaded Assignment Operator. | |
void | operator= (const std::vector< sample > &buffer) |
Overloaded Assignment Operator. | |
bool | operator== (const Buffer< sample > &buffer) const |
Checks if two Audio Buffers have equal values. | |
void | zeroPad (size_t startIndex, size_t endIndex) |
Zero Pad an Audio Buffer. | |
void | subBuffer (AuxPort::Audio::Buffer< sample > &subBuffer, const size_t &startIndex, const size_t &endIndex) |
Extract a Sub Buffer from an Audio Buffer. | |
double | mean () |
Averages the Audio buffer. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Buffer< sample > &buffer) |
Overloaded ostream operator, u can use std::cout to call AuxPort::Logger::Log() | |
Additional Inherited Members | |
![]() | |
void | setColour (const ColourType &colourType) |
This function allows you to set text colour for the text to be printed onto the console. | |
Buffer is a Generic Audio Buffer class that is a container for floating or integer type Audio Buffers.
sample | Template Type used for Generic Audio Buffers |
Definition at line 57 of file AuxBuffer.h.
|
inline |
Initializes Buffer with an array.
Definition at line 69 of file AuxBuffer.h.
|
inline |
Initializes Buffer with an std::vector.
Definition at line 77 of file AuxBuffer.h.
|
inline |
Initializes Buffer with another Buffer.
Definition at line 85 of file AuxBuffer.h.
|
inline |
Safely Deallocates memory and destroys the Buffer | v1.0.
Definition at line 93 of file AuxBuffer.h.
|
inline |
Addition of Two Audio Buffers.
Definition at line 241 of file AuxBuffer.h.
|
inline |
Adds a constant to every single value of the Audio Buffer.
Definition at line 198 of file AuxBuffer.h.
|
inline |
Adds coefficient to the value in the Audio Buffer at the specified "index".
Definition at line 209 of file AuxBuffer.h.
|
inline |
of std::vector to the Audio Buffer
Definition at line 219 of file AuxBuffer.h.
|
inline |
Addition of values in a C-Style array to the Audio Buffer.
Definition at line 230 of file AuxBuffer.h.
|
inline |
Divides coefficient from every single value of the Audio Buffer.
Definition at line 271 of file AuxBuffer.h.
|
inline |
Performs division between the value in the Audio Buffer at the specified "index" and the "value" passed.
Definition at line 281 of file AuxBuffer.h.
|
inline |
Returns a sample value at the provided index on the Buffer.
Definition at line 104 of file AuxBuffer.h.
|
inline |
Calculates the RMS in Linear/dbFS.
Definition at line 323 of file AuxBuffer.h.
|
inlineoverridevirtual |
Overloaded AuxPort::ILog::Log.
Reimplemented from AuxPort::ILog.
Definition at line 372 of file AuxBuffer.h.
|
inline |
Averages the Audio buffer.
Definition at line 440 of file AuxBuffer.h.
|
inline |
Multiplies coefficient to every single value of the Audio Buffer.
Definition at line 251 of file AuxBuffer.h.
|
inline |
Multiplies coefficient to the value in the Audio Buffer at the specified "index".
Definition at line 262 of file AuxBuffer.h.
|
inline |
Overloaded Assignment Operator.
Definition at line 382 of file AuxBuffer.h.
|
inline |
Overloaded Assignment Operator.
Definition at line 390 of file AuxBuffer.h.
|
inline |
Checks if two Audio Buffers have equal values.
Definition at line 398 of file AuxBuffer.h.
|
inline |
Returns a sample value at the provided index on the Buffer.
Definition at line 114 of file AuxBuffer.h.
|
inline |
Replaces the audio buffer with a std::vector.
Definition at line 176 of file AuxBuffer.h.
|
inline |
Replaces the audio buffer with a buffer pointer.
Definition at line 132 of file AuxBuffer.h.
|
inline |
Replaces the audio buffer with a std::vector.
Definition at line 154 of file AuxBuffer.h.
|
inline |
Resizes the audio buffer to the size given in the argument.
Definition at line 310 of file AuxBuffer.h.
|
inline |
Sets the sample to the specified index.
Definition at line 123 of file AuxBuffer.h.
|
inline |
Returns Size of Buffer.
Definition at line 337 of file AuxBuffer.h.
|
inline |
Extract a Sub Buffer from an Audio Buffer.
Definition at line 424 of file AuxBuffer.h.
|
inline |
Subtracts coefficient from every single value of the Audio Buffer.
Definition at line 291 of file AuxBuffer.h.
|
inline |
Performs subtraction between the value in the Audio Buffer at the specified "index" and the "value" passed.
Definition at line 302 of file AuxBuffer.h.
|
inline |
Definition at line 413 of file AuxBuffer.h.
|
friend |
Overloaded ostream operator, u can use std::cout to call AuxPort::Logger::Log()
Definition at line 345 of file AuxBuffer.h.