Navigation
API > API/Runtime > API/Runtime/SignalProcessing
TSlidingBuffer defines the window size and hop size of the sliding window, and it stores any samples needed to produce additional windows.
TSlidingBuffer should be used in conjunction with the TSlidingWindow, TScopedSlidingWindow or TAutoSlidingWindow classes.
| Name | TSlidingBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/SignalProcessing/Public/DSP/SlidingWindow.h |
| Include Path | #include "DSP/SlidingWindow.h" |
Syntax
template<typename InSampleType>
class TSlidingBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSlidingBuffer
(
const int32 InNumWindowSamples, |
Constructs a TSlidingBuffer with a constant window and hop size | DSP/SlidingWindow.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NumHopSamples | int32 | NumHopSamples describes the number of samples between adjacent windows. | DSP/SlidingWindow.h | |
| NumUnderflowSamples | int32 | When HopSize is greater than WindowSize a situation can occur where we need to account for hop samples that we have not yet ingested. | DSP/SlidingWindow.h | |
| NumWindowSamples | int32 | NumWindowSamples describes the number of samples in a window. | DSP/SlidingWindow.h | |
| StorageBuffer | TArray< InSampleType > | Stores samples from previous calls which are still needed for future buffers. | DSP/SlidingWindow.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetNumHopSamples() |
Returns the number of samples between windows. | DSP/SlidingWindow.h | |
int32 GetNumWindowSamples() |
Returns the number of samples in a window. | DSP/SlidingWindow.h | |
void Reset() |
Resets the internal storage. | DSP/SlidingWindow.h | |
void StoreForFutureWindows
(
TArrayView< const InSampleType > InBuffer |
StoreForFutureWindows stores the necessary samples from InBuffer which will be needed for future windows. | DSP/SlidingWindow.h |