Signalsmith Audio's DSP Library  1.6.0
Useful C++ classes/templates for audio effects
Methods
signalsmith::delay::Buffer< Sample >::View< isConst > Class Template Reference

#include <delay.h>

Detailed Description

template<typename Sample>
template<bool isConst>
class signalsmith::delay::Buffer< Sample >::View< isConst >

Holds a view for a particular position in the buffer.

Methods

 View (CBuffer &buffer, int offset=0)
 
 View (const View &other, int offset=0)
 
Viewoperator= (const View &other)
 
CSample & operator[] (int offset)
 
const Sample & operator[] (int offset) const
 
template<typename Data >
void write (Data &&data, int length)
 Write data into the buffer. More...
 
template<typename Data >
void read (int length, Data &&data) const
 Read data out from the buffer. More...
 
View operator+ (int offset) const
 
View operator- (int offset) const
 

Method Details

◆ read()

template<typename Sample >
template<bool isConst>
template<typename Data >
void signalsmith::delay::Buffer< Sample >::View< isConst >::read ( int  length,
Data &&  data 
) const
inline

Read data out from the buffer.

◆ write()

template<typename Sample >
template<bool isConst>
template<typename Data >
void signalsmith::delay::Buffer< Sample >::View< isConst >::write ( Data &&  data,
int  length 
)
inline

Write data into the buffer.