LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
lasp_timebuffer.h
Go to the documentation of this file.
1#pragma once
2#include "lasp_mathtypes.h"
3#include <memory>
4#include <optional>
5
6class TimeBufferImp;
11 std::unique_ptr<TimeBufferImp> _imp;
12
13public:
14 TimeBuffer();
22 void push(const dmat &mat);
23
27 void reset();
28
34 us size() const;
35
46 dmat pop(const us nframes, const us keep = 0);
47};
Implementation of a buffer of time samples, where.
dmat pop(const us nframes, const us keep=0)
Pop frames from the buffer. Throws a runtime error if more frames are requested than actually stored.
us size() const
Returns current size of stored amount of frames.
void reset()
Reset (empties) the time buffer.
void push(const dmat &mat)
Put samples in the buffer. Number of channels should match other frames, otherwise things go wrong.
arma::Mat< d > dmat
size_t us
We often use boolean values.
Definition lasp_types.h:29