HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
base class for buffers that store arithmetic types. Provides operations and methods for arithmetic data. More...
#include <ArithmeticBuffer.h>
Public Member Functions | |
virtual | ~ArithmeticBuffer ()=default |
Tdata | Min () const |
Tdata | Max () const |
double | Rms () const |
Public Member Functions inherited from Heph::BufferBase< Tself, Tdata > | |
virtual | ~BufferBase () |
virtual Tself | operator<< (size_t rhs) const |
virtual Tself & | operator<<= (size_t rhs) |
virtual Tself | operator>> (size_t rhs) const |
virtual Tself & | operator>>= (size_t rhs) |
virtual bool | operator== (const Tself &rhs) const |
virtual bool | operator!= (const Tself &rhs) const |
Tdata & | operator[] (size_t index) const |
size_t | Size () const |
size_t | SizeAsByte () const |
Tdata & | At (size_t index) const |
virtual bool | IsEmpty () const |
virtual void | Reset () |
virtual void | Release () |
virtual Tself | SubBuffer (size_t index, size_t size) const |
virtual void | Prepend (const Tself &rhs) |
virtual void | Append (const Tself &rhs) |
virtual void | Insert (const Tself &rhs, size_t index) |
virtual void | Cut (size_t index, size_t size) |
virtual void | Replace (const Tself &rhs, size_t index) |
virtual void | Replace (const Tself &rhs, size_t index, size_t size) |
virtual void | Resize (size_t newSize) |
virtual void | Reverse () |
Tdata * | begin () const |
Tdata * | end () const |
Public Member Functions inherited from Heph::BufferArithmeticOperators< Tself, Tdata > | |
BufferArithmeticOperators (const BufferArithmeticOperators &)=delete | |
BufferArithmeticOperators & | operator= (const BufferArithmeticOperators &)=delete |
Public Member Functions inherited from Heph::BufferAdditionOperator< Tself, Tdata, Tdata, Tdata > | |
BufferAdditionOperator (const BufferAdditionOperator &)=delete | |
BufferAdditionOperator & | operator= (const BufferAdditionOperator &)=delete |
Public Member Functions inherited from Heph::BufferSubtractionOperator< Tself, Tdata, Tdata, Tdata > | |
BufferSubtractionOperator (const BufferSubtractionOperator &)=delete | |
BufferSubtractionOperator & | operator= (const BufferSubtractionOperator &)=delete |
Public Member Functions inherited from Heph::BufferMultiplicationOperator< Tself, Tdata, Tdata, Tdata > | |
BufferMultiplicationOperator (const BufferMultiplicationOperator &)=delete | |
BufferMultiplicationOperator & | operator= (const BufferMultiplicationOperator &)=delete |
Public Member Functions inherited from Heph::BufferDivisionOperator< Tself, Tdata, Tdata, Tdata > | |
BufferDivisionOperator (const BufferDivisionOperator &)=delete | |
BufferDivisionOperator & | operator= (const BufferDivisionOperator &)=delete |
Public Member Functions inherited from Heph::BufferArithmeticOperators< Tself, Tdata, Tself, Tdata > | |
BufferArithmeticOperators (const BufferArithmeticOperators &)=delete | |
BufferArithmeticOperators & | operator= (const BufferArithmeticOperators &)=delete |
Public Member Functions inherited from Heph::BufferAdditionOperator< Tself, Tdata, Tself, Tdata > | |
BufferAdditionOperator (const BufferAdditionOperator &)=delete | |
BufferAdditionOperator & | operator= (const BufferAdditionOperator &)=delete |
Public Member Functions inherited from Heph::BufferSubtractionOperator< Tself, Tdata, Tself, Tdata > | |
BufferSubtractionOperator (const BufferSubtractionOperator &)=delete | |
BufferSubtractionOperator & | operator= (const BufferSubtractionOperator &)=delete |
Public Member Functions inherited from Heph::BufferMultiplicationOperator< Tself, Tdata, Tself, Tdata > | |
BufferMultiplicationOperator (const BufferMultiplicationOperator &)=delete | |
BufferMultiplicationOperator & | operator= (const BufferMultiplicationOperator &)=delete |
Public Member Functions inherited from Heph::BufferDivisionOperator< Tself, Tdata, Tself, Tdata > | |
BufferDivisionOperator (const BufferDivisionOperator &)=delete | |
BufferDivisionOperator & | operator= (const BufferDivisionOperator &)=delete |
Protected Member Functions | |
ArithmeticBuffer () | |
ArithmeticBuffer (size_t size) | |
ArithmeticBuffer (size_t size, BufferFlags flags) | |
ArithmeticBuffer (const std::initializer_list< Tdata > &rhs) | |
ArithmeticBuffer (const ArithmeticBuffer &rhs) | |
ArithmeticBuffer (ArithmeticBuffer &&rhs) noexcept | |
Protected Member Functions inherited from Heph::BufferBase< Tself, Tdata > | |
BufferBase () | |
BufferBase (size_t size) | |
BufferBase (size_t size, BufferFlags flags) | |
BufferBase (const std::initializer_list< Tdata > &rhs) | |
BufferBase (const BufferBase &rhs) | |
BufferBase (BufferBase &&rhs) noexcept | |
Tself & | operator= (const std::initializer_list< Tdata > &rhs) |
Tself & | operator= (const Tself &rhs) |
Tself & | operator= (Tself &&rhs) noexcept |
Static Protected Attributes | |
static constexpr Tdata | MIN_ELEMENT = std::numeric_limits<Tdata>::lowest() |
static constexpr Tdata | MAX_ELEMENT = std::numeric_limits<Tdata>::max() |
Additional Inherited Members | |
Static Protected Member Functions inherited from Heph::BufferBase< Tself, Tdata > | |
static size_t | SizeAsByte (size_t size) |
template<typename U = Tdata> | |
static std::enable_if< std::is_class< U >::value >::type | Initialize (U *pData, U *pDataEnd) |
template<typename U = Tdata> | |
static std::enable_if<!std::is_class< U >::value >::type | Initialize (U *pData, U *pDataEnd) |
static Tdata * | Allocate (size_t size_byte) |
static Tdata * | AllocateUninitialized (size_t size_byte) |
static Tdata * | SubBuffer (Tdata *pThisData, size_t thisSize_byte, size_t index_byte, size_t subBufferSize_byte) |
static Tdata * | Prepend (Tdata *pThisData, size_t thisSize_byte, Tdata *pRhsData, size_t rhsSize_byte) |
static Tdata * | Append (Tdata *pThisData, size_t thisSize_byte, Tdata *pRhsData, size_t rhsSize_byte) |
static Tdata * | Insert (Tdata *pThisData, size_t thisSize_byte, Tdata *pRhsData, size_t rhsSize_byte, size_t index_byte) |
static Tdata * | Cut (Tdata *pThisData, size_t thisSize_byte, size_t index_byte, size_t &cutSize_byte) |
static void | Replace (Tdata *pThisData, size_t thisSize_byte, Tdata *pRhsData, size_t rhsSize_byte, size_t index_byte) |
Protected Attributes inherited from Heph::BufferBase< Tself, Tdata > | |
Tdata * | pData |
size_t | size |
base class for buffers that store arithmetic types. Provides operations and methods for arithmetic data.
Tself | Type of the final buffer that inherits from this class (CRTP). |
Tdata | Type of the data the buffer stores, must be arithmetic type. |
|
inlineprotected |
creates a new instance and initializes it with default values.
|
inlineexplicitprotected |
creates a new instance and initializes it with the provided values.
size | number of elements the buffer will store. |
|
inlineprotected |
creates a new instance and initializes it with the provided values.
size | number of elements the buffer will store. |
flags | flags. |
|
inlineprotected |
creates a new instance and initializes it with the provided values.
rhs | a list of elements the buffer will store. |
|
inlineprotected |
creates a new instance and copies the rhs's data to it.
rhs | instance whose data will be copied. |
|
inlineprotectednoexcept |
creates a new instance and moves the rhs's data to it.
rhs | instance whose data will be moved. |
|
virtualdefault |
releases the resources and destroys the instance.
|
inline |
gets the minimum value stored in the buffer.
|
inline |
gets the maximum value stored in the buffer.
|
inline |
calculates the root mean square.
|
staticconstexprprotected |
element with the minimum value.
|
staticconstexprprotected |
element with the maximum value.