LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
TimeBuffer Class Reference

Implementation of a buffer of time samples, where. More...

#include <lasp_timebuffer.h>

Public Member Functions

 TimeBuffer ()
 
 ~TimeBuffer ()
 
void push (const dmat &mat)
 Put samples in the buffer. Number of channels should match other frames, otherwise things go wrong.
 
void reset ()
 Reset (empties) the time buffer.
 
us size () const
 Returns current size of stored amount of frames.
 
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.
 

Detailed Description

Implementation of a buffer of time samples, where.

Definition at line 10 of file lasp_timebuffer.h.

Constructor & Destructor Documentation

◆ TimeBuffer()

TimeBuffer::TimeBuffer ( )

Definition at line 82 of file lasp_timebuffer.cpp.

◆ ~TimeBuffer()

TimeBuffer::~TimeBuffer ( )

Definition at line 86 of file lasp_timebuffer.cpp.

Member Function Documentation

◆ pop()

dmat TimeBuffer::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.

Parameters
nframesThe number of rows
keepThe number of frames to copy, but also to keep in the buffer (usage: overlap)
Returns
Array time samples for each channel

Definition at line 83 of file lasp_timebuffer.cpp.

◆ push()

void TimeBuffer::push ( const dmat mat)

Put samples in the buffer. Number of channels should match other frames, otherwise things go wrong.

Parameters
matSamples to push, axes should be as mat(frame, channel).

Definition at line 88 of file lasp_timebuffer.cpp.

◆ reset()

void TimeBuffer::reset ( )

Reset (empties) the time buffer.

Definition at line 87 of file lasp_timebuffer.cpp.

◆ size()

us TimeBuffer::size ( ) const

Returns current size of stored amount of frames.

Returns
The current amount of frames in the storage

Definition at line 89 of file lasp_timebuffer.cpp.


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