Pico-Arduino
Public Member Functions | Protected Attributes | List of all members
pico_arduino::Buffers< T > Class Template Reference

We are managing a 2 collections of memory arrays: One for the available buffers which can be requested to record data and the buffers of filled data which need to be processed (e.g. stored to a SD drive) More...

#include <Buffers.h>

Inheritance diagram for pico_arduino::Buffers< T >:
pico_arduino::SoundBuffer< T >

Public Member Functions

 Buffers (int buffer_count, int buffer_length, bool blocking=true, bool synchronized=true)
 Construct a new Buffers object. More...
 
 ~Buffers ()
 Destructor.
 
virtual void addEmpty (T *buffer)
 Makes the buffer available as empty.
 
virtual void addFull (T *buffer)
 Adds the buffer to the list of available data.
 
virtual int bufferLength ()
 Provides the length of each buffer.
 
virtual T * getEmpty ()
 Retrieves an empty buffer.
 
virtual T * getFull ()
 Retrieves the next available data.
 

Protected Attributes

float amplifier
 
int buffer_count
 
int buffer_length
 
clip
 
Queue< T * > * emptyBuffers
 
Queue< T * > * filledBuffers
 

Detailed Description

template<class T>
class pico_arduino::Buffers< T >

We are managing a 2 collections of memory arrays: One for the available buffers which can be requested to record data and the buffers of filled data which need to be processed (e.g. stored to a SD drive)

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ Buffers()

template<class T >
pico_arduino::Buffers< T >::Buffers ( int  buffer_count,
int  buffer_length,
bool  blocking = true,
bool  synchronized = true 
)
inline

Construct a new Buffers object.

Parameters
buffer_count
buffer_length
blocking
synchronized

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