|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <delay_line.hpp>
Public Member Functions | |
| DelayLine (float *buffer, uint32_t max_delay) | |
| Construct with caller-provided buffer. | |
| void | write (float sample) |
| Write a sample to the delay line. | |
| float | read (uint32_t delay) const |
| Read a sample at integer delay. | |
| float | read_fractional (float delay) const |
| Read with fractional delay (float) | |
| void | clear () |
| Zero all samples in the buffer. | |
| uint32_t | max_delay () const |
| Maximum delay in samples. | |
Definition at line 18 of file delay_line.hpp.
|
inline |
Construct with caller-provided buffer.
| buffer | Float buffer (must outlive the DelayLine) |
| max_delay | Maximum delay in samples (buffer size) |
Definition at line 27 of file delay_line.hpp.
|
inline |
Zero all samples in the buffer.
Definition at line 69 of file delay_line.hpp.
|
inline |
Maximum delay in samples.
Definition at line 77 of file delay_line.hpp.
|
inline |
Read a sample at integer delay.
| delay | Delay in samples (0 = most recent write) |
Definition at line 44 of file delay_line.hpp.
Referenced by read_fractional().
|
inline |
Read with fractional delay (float)
Linear interpolation between adjacent samples.
| delay | Fractional delay in samples (e.g. 10.5f) |
Definition at line 58 of file delay_line.hpp.
References read().
|
inline |
Write a sample to the delay line.
Definition at line 31 of file delay_line.hpp.