engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
Audio::TAutoSlidingWindow< InSampleType, InAllocator > 模板类 参考

TAutoSlidingWindow 更多...

#include <SlidingWindow.h>

+ 类 Audio::TAutoSlidingWindow< InSampleType, InAllocator > 继承关系图:

Public 成员函数

TAutoSlidingWindowIterator begin ()
 Creates STL like iterator which slides over samples. 更多...
 
TAutoSlidingWindowIterator end ()
 Creates STL like iterator denotes the end of the sliding window. 更多...
 
 TAutoSlidingWindow (TSlidingBuffer< InSampleType > &InBuffer, TArrayView< const InSampleType > InNewBuffer, TArray< InSampleType, InAllocator > &OutWindow, bool bDoFlush=false)
 TAutoSlidingWindow constructor 更多...
 
- Public 成员函数 继承自 Audio::TScopedSlidingWindow< InSampleType >
 TScopedSlidingWindow (TSlidingBuffer< InSampleType > &InSlidingBuffer, TArrayView< const InSampleType > InNewBuffer, bool bDoFlush=false)
 TScopedSlidingWindow constructor 更多...
 
virtual ~TScopedSlidingWindow ()
 Calls InSlidingBuffer.StoreForFutureWindows(InNewBuffer).
 
- Public 成员函数 继承自 Audio::TSlidingWindow< InSampleType >
template<typename InAllocator = FDefaultAllocator>
TSlidingWindowIterator< InAllocator > begin (TArray< InSampleType, InAllocator > &OutWindowBuffer) const
 Creates STL like iterator which slides over samples. 更多...
 
template<typename InAllocator = FDefaultAllocator>
TSlidingWindowIterator< InAllocator > end (TArray< InSampleType, InAllocator > &OutWindowBuffer) const
 Creates STL like iterator denotes the end of the sliding window. 更多...
 
 TSlidingWindow (const TSlidingBuffer< InSampleType > &InSlidingBuffer, TArrayView< const InSampleType > InNewBuffer, bool bDoFlush)
 TSlidingWindow constructor 更多...
 

详细描述

template<typename InSampleType, typename InAllocator = FDefaultAllocator>
class Audio::TAutoSlidingWindow< InSampleType, InAllocator >

TAutoSlidingWindow

TAutoSlidingWindow enables use of a sliding window within a range-based for loop.

Example:

void ProcessAudio(TSlidingBuffer<float>& SlidingBuffer, const TArray<float>& NewSamples) { TArray<float> WindowData; TAutoSlidingWindow<float> SlidingWindow(SlidingBuffer, NewSamples, WindowData);

for (TArray<float>& Window : SlidingWindow) { ... audio processing on single window here } }

int main() { int32 NumWindowSamples = 4; int32 NumHopSamples = 2; TSlidingBuffer<float> SlidingBuffer(NumWindowSamples, NumHopSamples);

TArray<float> Buffer1({1, 2, 3, 4, 5, 6, 7});

ProcessAudio(SlidingBuffer, Buffer1);

TArray<float> Buffer2({8, 9, 10, 11});

ProcessAudio(SlidingBuffer, Buffer2); }

构造及析构函数说明

◆ TAutoSlidingWindow()

template<typename InSampleType , typename InAllocator = FDefaultAllocator>
Audio::TAutoSlidingWindow< InSampleType, InAllocator >::TAutoSlidingWindow ( TSlidingBuffer< InSampleType > &  InBuffer,
TArrayView< const InSampleType >  InNewBuffer,
TArray< InSampleType, InAllocator > &  OutWindow,
bool  bDoFlush = false 
)
inline

TAutoSlidingWindow constructor

InSlidingBuffer Holds the previous samples which were not completely used in previous sliding windows. It also defines the window and hop size. InNewBuffer Holds new samples which have not yet been ingested by the InSlidingBuffer. OutWindow is shared by all iterators created by calling begin() or end(). bDoFlush Controls whether zeros to the final output windows until all possible windows with data from InNewBuffer have been covered.

成员函数说明

◆ begin()

template<typename InSampleType , typename InAllocator = FDefaultAllocator>
TAutoSlidingWindowIterator Audio::TAutoSlidingWindow< InSampleType, InAllocator >::begin ( )
inline

Creates STL like iterator which slides over samples.

This iterator maintains a reference to the OutWindow passed into the constructor. That array will be manipulated when the iterator's * operator is called.

◆ end()

template<typename InSampleType , typename InAllocator = FDefaultAllocator>
TAutoSlidingWindowIterator Audio::TAutoSlidingWindow< InSampleType, InAllocator >::end ( )
inline

Creates STL like iterator denotes the end of the sliding window.

This iterator maintains a reference to the OutWindow passed into the constructor. That array will be manipulated when the iterator's * operator is called.


该类的文档由以下文件生成: