Signalsmith Audio's DSP Library  1.6.0
Useful C++ classes/templates for audio effects
Nested Classes | Types | Methods
signalsmith::delay::MultiBuffer< Sample > Class Template Reference

#include <delay.h>

Detailed Description

template<typename Sample>
class signalsmith::delay::MultiBuffer< Sample >

Multi-channel delay buffer.

This behaves similarly to the single-channel Buffer, with the following differences:

buffer[c] returns a view for a single channel, which behaves like the single-channel Buffer::View. The constructor and .resize() take an additional first channel argument.

Inherited by signalsmith::spectral::STFT< Sample >.

Nested Classes

class  Stride
 A reference-like multi-channel result for a particular sample index. More...
 
class  View
 Holds a particular position in the buffer. More...
 

Types

using ConstChannel = typename Buffer< Sample >::ConstView
 
using MutableChannel = typename Buffer< Sample >::MutableView
 
using MutableView = View< false >
 
using ConstView = View< true >
 

Methods

 MultiBuffer (int channels=0, int capacity=0)
 
void resize (int nChannels, int capacity, Sample value=Sample())
 
void reset (Sample value=Sample())
 
Stride< false > at (int offset)
 
Stride< true > at (int offset) const
 
MutableView view (int offset=0)
 
ConstView view (int offset=0) const
 
ConstView constView (int offset=0) const
 
MutableChannel operator[] (int channel)
 
ConstChannel operator[] (int channel) const
 
MultiBufferoperator++ ()
 
MultiBufferoperator+= (int i)
 
MutableView operator++ (int)
 
MutableView operator+ (int i)
 
ConstView operator+ (int i) const
 
MultiBufferoperator-- ()
 
MultiBufferoperator-= (int i)
 
MutableView operator-- (int)
 
MutableView operator- (int i)
 
ConstView operator- (int i) const