HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Heph::DoubleBuffer Class Referencefinal

buffer for storing doubles. More...

#include <DoubleBuffer.h>

Inheritance diagram for Heph::DoubleBuffer:
Heph::SignedArithmeticBuffer< DoubleBuffer, double > Heph::ArithmeticBuffer< DoubleBuffer, double > Heph::BufferUnaryMinusOperator< DoubleBuffer, double > Heph::BufferBase< DoubleBuffer, double > Heph::BufferArithmeticOperators< DoubleBuffer, double > Heph::BufferArithmeticOperators< DoubleBuffer, double, DoubleBuffer, double > Heph::BufferDivisionOperator< DoubleBuffer, double, DoubleBuffer, double > Heph::BufferMultiplicationOperator< DoubleBuffer, double, DoubleBuffer, double > Heph::BufferSubtractionOperator< DoubleBuffer, double, DoubleBuffer, double > Heph::BufferAdditionOperator< DoubleBuffer, double, DoubleBuffer, double > Heph::BufferDivisionOperator< DoubleBuffer, double, double, double > Heph::BufferMultiplicationOperator< DoubleBuffer, double, double, double > Heph::BufferSubtractionOperator< DoubleBuffer, double, double, double > Heph::BufferAdditionOperator< DoubleBuffer, double, double, double >

Public Member Functions

 DoubleBuffer ()
 
 DoubleBuffer (size_t size)
 
 DoubleBuffer (size_t size, BufferFlags flags)
 
 DoubleBuffer (const std::initializer_list< double > &rhs)
 
 DoubleBuffer (const DoubleBuffer &rhs)
 
 DoubleBuffer (DoubleBuffer &&rhs) noexcept
 
DoubleBufferoperator= (const std::initializer_list< double > &rhs)
 
DoubleBufferoperator= (const DoubleBuffer &rhs)
 
DoubleBufferoperator= (DoubleBuffer &&rhs) noexcept
 
- Public Member Functions inherited from Heph::SignedArithmeticBuffer< DoubleBuffer, double >
virtual ~SignedArithmeticBuffer ()=default
 
void Invert ()
 
double AbsMax () const
 
- Public Member Functions inherited from Heph::ArithmeticBuffer< DoubleBuffer, double >
virtual ~ArithmeticBuffer ()=default
 
double Min () const
 
double Max () const
 
double Rms () const
 
- Public Member Functions inherited from Heph::BufferBase< DoubleBuffer, double >
virtual ~BufferBase ()
 
virtual DoubleBuffer operator<< (size_t rhs) const
 
virtual DoubleBufferoperator<<= (size_t rhs)
 
virtual DoubleBuffer operator>> (size_t rhs) const
 
virtual DoubleBufferoperator>>= (size_t rhs)
 
virtual bool operator== (const DoubleBuffer &rhs) const
 
virtual bool operator!= (const DoubleBuffer &rhs) const
 
double & operator[] (size_t index) const
 
size_t Size () const
 
size_t SizeAsByte () const
 
double & At (size_t index) const
 
virtual bool IsEmpty () const
 
virtual void Reset ()
 
virtual void Release ()
 
virtual DoubleBuffer SubBuffer (size_t index, size_t size) const
 
virtual void Prepend (const DoubleBuffer &rhs)
 
virtual void Append (const DoubleBuffer &rhs)
 
virtual void Insert (const DoubleBuffer &rhs, size_t index)
 
virtual void Cut (size_t index, size_t size)
 
virtual void Replace (const DoubleBuffer &rhs, size_t index)
 
virtual void Replace (const DoubleBuffer &rhs, size_t index, size_t size)
 
virtual void Resize (size_t newSize)
 
virtual void Reverse ()
 
double * begin () const
 
double * end () const
 
- Public Member Functions inherited from Heph::BufferArithmeticOperators< DoubleBuffer, double >
 BufferArithmeticOperators (const BufferArithmeticOperators &)=delete
 
BufferArithmeticOperatorsoperator= (const BufferArithmeticOperators &)=delete
 
- Public Member Functions inherited from Heph::BufferAdditionOperator< DoubleBuffer, double, double, double >
 BufferAdditionOperator (const BufferAdditionOperator &)=delete
 
BufferAdditionOperatoroperator= (const BufferAdditionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferSubtractionOperator< DoubleBuffer, double, double, double >
 BufferSubtractionOperator (const BufferSubtractionOperator &)=delete
 
BufferSubtractionOperatoroperator= (const BufferSubtractionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferMultiplicationOperator< DoubleBuffer, double, double, double >
 BufferMultiplicationOperator (const BufferMultiplicationOperator &)=delete
 
BufferMultiplicationOperatoroperator= (const BufferMultiplicationOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferDivisionOperator< DoubleBuffer, double, double, double >
 BufferDivisionOperator (const BufferDivisionOperator &)=delete
 
BufferDivisionOperatoroperator= (const BufferDivisionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferArithmeticOperators< DoubleBuffer, double, DoubleBuffer, double >
 BufferArithmeticOperators (const BufferArithmeticOperators &)=delete
 
BufferArithmeticOperatorsoperator= (const BufferArithmeticOperators &)=delete
 
- Public Member Functions inherited from Heph::BufferAdditionOperator< DoubleBuffer, double, DoubleBuffer, double >
 BufferAdditionOperator (const BufferAdditionOperator &)=delete
 
BufferAdditionOperatoroperator= (const BufferAdditionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferSubtractionOperator< DoubleBuffer, double, DoubleBuffer, double >
 BufferSubtractionOperator (const BufferSubtractionOperator &)=delete
 
BufferSubtractionOperatoroperator= (const BufferSubtractionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferMultiplicationOperator< DoubleBuffer, double, DoubleBuffer, double >
 BufferMultiplicationOperator (const BufferMultiplicationOperator &)=delete
 
BufferMultiplicationOperatoroperator= (const BufferMultiplicationOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferDivisionOperator< DoubleBuffer, double, DoubleBuffer, double >
 BufferDivisionOperator (const BufferDivisionOperator &)=delete
 
BufferDivisionOperatoroperator= (const BufferDivisionOperator &)=delete
 
- Public Member Functions inherited from Heph::BufferUnaryMinusOperator< DoubleBuffer, double >
 BufferUnaryMinusOperator (const BufferUnaryMinusOperator &)=delete
 
BufferUnaryMinusOperatoroperator= (const BufferUnaryMinusOperator &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from Heph::SignedArithmeticBuffer< DoubleBuffer, double >
 SignedArithmeticBuffer ()
 
 SignedArithmeticBuffer (size_t size)
 
 SignedArithmeticBuffer (size_t size, BufferFlags flags)
 
 SignedArithmeticBuffer (const std::initializer_list< double > &rhs)
 
 SignedArithmeticBuffer (const SignedArithmeticBuffer &rhs)
 
 SignedArithmeticBuffer (SignedArithmeticBuffer &&rhs) noexcept
 
- Protected Member Functions inherited from Heph::ArithmeticBuffer< DoubleBuffer, double >
 ArithmeticBuffer ()
 
 ArithmeticBuffer (size_t size)
 
 ArithmeticBuffer (size_t size, BufferFlags flags)
 
 ArithmeticBuffer (const std::initializer_list< double > &rhs)
 
 ArithmeticBuffer (const ArithmeticBuffer &rhs)
 
 ArithmeticBuffer (ArithmeticBuffer &&rhs) noexcept
 
- Protected Member Functions inherited from Heph::BufferBase< DoubleBuffer, double >
 BufferBase ()
 
 BufferBase (size_t size)
 
 BufferBase (size_t size, BufferFlags flags)
 
 BufferBase (const std::initializer_list< double > &rhs)
 
 BufferBase (const BufferBase &rhs)
 
 BufferBase (BufferBase &&rhs) noexcept
 
DoubleBufferoperator= (const std::initializer_list< double > &rhs)
 
DoubleBufferoperator= (const DoubleBuffer &rhs)
 
DoubleBufferoperator= (DoubleBuffer &&rhs) noexcept
 
- Static Protected Member Functions inherited from Heph::BufferBase< DoubleBuffer, double >
static size_t SizeAsByte (size_t size)
 
static double * SubBuffer (double *pThisData, size_t thisSize_byte, size_t index_byte, size_t subBufferSize_byte)
 
static double * Prepend (double *pThisData, size_t thisSize_byte, double *pRhsData, size_t rhsSize_byte)
 
static double * Append (double *pThisData, size_t thisSize_byte, double *pRhsData, size_t rhsSize_byte)
 
static double * Insert (double *pThisData, size_t thisSize_byte, double *pRhsData, size_t rhsSize_byte, size_t index_byte)
 
static double * Cut (double *pThisData, size_t thisSize_byte, size_t index_byte, size_t &cutSize_byte)
 
static void Replace (double *pThisData, size_t thisSize_byte, double *pRhsData, size_t rhsSize_byte, size_t index_byte)
 
static std::enable_if< std::is_class< U >::value >::type Initialize (U *pData, U *pDataEnd)
 
static std::enable_if<!std::is_class< U >::value >::type Initialize (U *pData, U *pDataEnd)
 
static double * Allocate (size_t size_byte)
 
static double * AllocateUninitialized (size_t size_byte)
 
- Protected Attributes inherited from Heph::BufferBase< DoubleBuffer, double >
double * pData
 
size_t size
 
- Static Protected Attributes inherited from Heph::ArithmeticBuffer< DoubleBuffer, double >
static constexpr double MIN_ELEMENT
 
static constexpr double MAX_ELEMENT
 

Detailed Description

buffer for storing doubles.

Constructor & Destructor Documentation

◆ DoubleBuffer() [1/6]

Heph::DoubleBuffer::DoubleBuffer ( )

creates a new instance and initializes it with default values.

◆ DoubleBuffer() [2/6]

Heph::DoubleBuffer::DoubleBuffer ( size_t size)
explicit

creates a new instance and initializes it with the provided values.

Parameters
sizenumber of elements the buffer will store.

◆ DoubleBuffer() [3/6]

Heph::DoubleBuffer::DoubleBuffer ( size_t size,
BufferFlags flags )

creates a new instance and initializes it with the provided values.

Parameters
sizenumber of elements the buffer will store.
flagsflags.

◆ DoubleBuffer() [4/6]

Heph::DoubleBuffer::DoubleBuffer ( const std::initializer_list< double > & rhs)

creates a new instance and initializes it with the provided values.

Parameters
rhsa list of elements the buffer will store.

◆ DoubleBuffer() [5/6]

Heph::DoubleBuffer::DoubleBuffer ( const DoubleBuffer & rhs)

creates a new instance and copies the rhs's data to it.

Parameters
rhsinstance whose data will be copied.

◆ DoubleBuffer() [6/6]

Heph::DoubleBuffer::DoubleBuffer ( DoubleBuffer && rhs)
noexcept

creates a new instance and moves the rhs's data to it.

Parameters
rhsinstance whose data will be moved.