RAII wrapper for the circular buffer helper used by VAD.
More...
#include <cxx-api.h>
|
| void | Destroy (const SherpaOnnxCircularBuffer *p) const |
| | Destroy the wrapped C handle.
|
| void | Push (const float *p, int32_t n) const |
| | Append samples to the buffer.
|
| std::vector< float > | Get (int64_t start_index, int32_t n) const |
| | Copy a contiguous span from the buffer.
|
| void | Pop (int32_t n) const |
| | Remove samples from the head of the buffer.
|
| int32_t | Size () const |
| | Return the number of stored samples.
|
| int64_t | Head () const |
| | Return the current head index.
|
| void | Reset () const |
| | Reset the buffer to empty.
|
| | MoveOnly ()=default |
| | Construct an empty wrapper.
|
| | ~MoveOnly () |
| | Destroy the wrapped handle if present.
|
| MoveOnly & | operator= (const MoveOnly &)=delete |
| const SherpaOnnxCircularBuffer * | Get () const |
| | Return the wrapped raw pointer without transferring ownership.
|
| const SherpaOnnxCircularBuffer * | Release () |
| | Release ownership of the wrapped raw pointer.
|
|
| static CircularBuffer | Create (int32_t capacity) |
| | Create a circular buffer with the given capacity in samples.
|
Definition at line 1713 of file cxx-api.h.
◆ Create()
| CircularBuffer sherpa_onnx::cxx::CircularBuffer::Create |
( |
int32_t | capacity | ) |
|
|
static |
◆ Destroy()
◆ Get()
| std::vector< float > sherpa_onnx::cxx::CircularBuffer::Get |
( |
int64_t | start_index, |
|
|
int32_t | n ) const |
◆ Head()
| int64_t sherpa_onnx::cxx::CircularBuffer::Head |
( |
| ) |
const |
◆ Pop()
| void sherpa_onnx::cxx::CircularBuffer::Pop |
( |
int32_t | n | ) |
const |
◆ Push()
| void sherpa_onnx::cxx::CircularBuffer::Push |
( |
const float * | p, |
|
|
int32_t | n ) const |
◆ Reset()
| void sherpa_onnx::cxx::CircularBuffer::Reset |
( |
| ) |
const |
◆ Size()
| int32_t sherpa_onnx::cxx::CircularBuffer::Size |
( |
| ) |
const |
The documentation for this class was generated from the following file: