Contains samples for one full signal cycle at a specific frequency. More...

#include <ToneBuffer.h>

Collaboration diagram for ToneBuffer:

Public Types

typedef uint32_t Sample
 

Public Member Functions

 ~ToneBuffer ()
 
bool allocate (unsigned sampleCount)
 
SamplegetData ()
 
unsigned getCapacity ()
 
unsigned getSampleCount ()
 

Public Attributes

unsigned repeatCount = 0
 

Static Public Attributes

static constexpr auto sampleSize = sizeof(Sample)
 

Detailed Description

Contains samples for one full signal cycle at a specific frequency.

Note
Data is stored Delta-Sigma modulated to minimise I2S transfer overhead.

Member Typedef Documentation

◆ Sample

typedef uint32_t ToneBuffer::Sample

Constructor & Destructor Documentation

◆ ~ToneBuffer()

ToneBuffer::~ToneBuffer ( )
inline

Member Function Documentation

◆ allocate()

bool ToneBuffer::allocate ( unsigned  sampleCount)
inline

◆ getCapacity()

unsigned ToneBuffer::getCapacity ( )
inline

◆ getData()

Sample* ToneBuffer::getData ( )
inline

◆ getSampleCount()

unsigned ToneBuffer::getSampleCount ( )
inline

Member Data Documentation

◆ repeatCount

unsigned ToneBuffer::repeatCount = 0

◆ sampleSize

constexpr auto ToneBuffer::sampleSize = sizeof(Sample)
staticconstexpr

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