qm-dsp 1.8
Window< T > Class Template Reference

Various shaped windows for sample frame conditioning, including cosine windows (Hann etc) and triangular and rectangular windows. More...

#include <Window.h>

Public Member Functions

 Window (WindowType type, int size)
 Construct a windower of the given type and size.
 Window (const Window &w)
Windowoperator= (const Window &w)
virtual ~Window ()
void cut (T *src) const
void cut (const T *src, T *dst) const
WindowType getType () const
int getSize () const
std::vector< T > getWindowData () const

Protected Member Functions

void encache ()

Protected Attributes

WindowType m_type
int m_size
T * m_cache

Detailed Description

template<typename T>
class Window< T >

Various shaped windows for sample frame conditioning, including cosine windows (Hann etc) and triangular and rectangular windows.

Definition at line 40 of file Window.h.

Constructor & Destructor Documentation

◆ Window() [1/2]

template<typename T>
Window< T >::Window ( WindowType type,
int size )
inline

Construct a windower of the given type and size.

Note that the cosine windows are periodic by design, rather than symmetrical. (A window of size N is equivalent to a symmetrical window of size N+1 with the final element missing.)

Definition at line 50 of file Window.h.

References encache(), m_size, and m_type.

Referenced by operator=(), and Window().

◆ Window() [2/2]

template<typename T>
Window< T >::Window ( const Window< T > & w)
inline

Definition at line 51 of file Window.h.

References encache(), m_size, m_type, and Window().

◆ ~Window()

template<typename T>
virtual Window< T >::~Window ( )
inlinevirtual

Definition at line 59 of file Window.h.

References m_cache.

Member Function Documentation

◆ operator=()

template<typename T>
Window & Window< T >::operator= ( const Window< T > & w)
inline

Definition at line 52 of file Window.h.

References encache(), m_size, m_type, and Window().

◆ cut() [1/2]

template<typename T>
void Window< T >::cut ( T * src) const
inline

Definition at line 61 of file Window.h.

References cut().

Referenced by cut().

◆ cut() [2/2]

template<typename T>
void Window< T >::cut ( const T * src,
T * dst ) const
inline

Definition at line 62 of file Window.h.

References m_cache, and m_size.

◆ getType()

template<typename T>
WindowType Window< T >::getType ( ) const
inline

Definition at line 66 of file Window.h.

References m_type.

◆ getSize()

template<typename T>
int Window< T >::getSize ( ) const
inline

Definition at line 67 of file Window.h.

References m_size.

◆ getWindowData()

template<typename T>
std::vector< T > Window< T >::getWindowData ( ) const
inline

Definition at line 69 of file Window.h.

References m_cache, and m_size.

◆ encache()

template<typename T>
void Window< T >::encache ( )
protected

Member Data Documentation

◆ m_type

template<typename T>
WindowType Window< T >::m_type
protected

Definition at line 78 of file Window.h.

Referenced by encache(), getType(), operator=(), Window(), and Window().

◆ m_size

template<typename T>
int Window< T >::m_size
protected

Definition at line 79 of file Window.h.

Referenced by cut(), encache(), getSize(), getWindowData(), operator=(), Window(), and Window().

◆ m_cache

template<typename T>
T* Window< T >::m_cache
protected

Definition at line 80 of file Window.h.

Referenced by cut(), encache(), getWindowData(), and ~Window().


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