Audio Processing Framework (APF)  version 0.3.0
Public Types | Public Member Functions | List of all members
apf::NonCausalBlockDelayLine< T, Container > Class Template Reference

A block-based delay line where negative delay is possible. More...

#include <apf/blockdelayline.h>

Inheritance diagram for apf::NonCausalBlockDelayLine< T, Container >:
Inheritance graph
[legend]

Public Types

using difference_type = typename _base::circulator::difference_type
 
using size_type = typename Container::size_type
 
using circulator = apf::circular_iterator< typename Container::iterator >
 

Public Member Functions

 NonCausalBlockDelayLine (size_type block_size, size_type max_delay, size_type initial_delay)
 Constructor. More...
 
void advance ()
 
template<typename Iterator >
void write_block (Iterator source)
 
pointer get_write_pointer () const
 
bool delay_is_valid (difference_type delay, difference_type &corrected) const
 Check if a given delay is valid. More...
 
bool delay_is_valid (difference_type delay) const
 Return true if delay is valid. More...
 
template<typename Iterator >
bool read_block (Iterator destination, difference_type delay) const
 
template<typename Iterator >
bool read_block (Iterator destination, difference_type delay, T weight) const
 
circulator get_read_circulator (difference_type delay=0) const
 

Detailed Description

template<typename T, typename Container = std::vector<T>>
class apf::NonCausalBlockDelayLine< T, Container >

A block-based delay line where negative delay is possible.

This is done by delaying everything by a given initial delay. The (absolute value of the) negative delay can be at most as large as the initial delay.

See also
BlockDelayLine

Definition at line 224 of file blockdelayline.h.

Constructor & Destructor Documentation

template<typename T , typename Container = std::vector<T>>
apf::NonCausalBlockDelayLine< T, Container >::NonCausalBlockDelayLine ( size_type  block_size,
size_type  max_delay,
size_type  initial_delay 
)
inline

Constructor.

Parameters
initial_delayinitial delay
block_sizeBlock size
max_delayMaximum delay in samples
initial_delayAdditional delay to achieve negative delay
See also
BlockDelayLine::BlockDelayLine()

Definition at line 239 of file blockdelayline.h.

References apf::BlockDelayLine< T, Container >::advance(), apf::BlockDelayLine< T, Container >::get_write_pointer(), and apf::BlockDelayLine< T, Container >::write_block().

Member Function Documentation

template<typename T , typename Container = std::vector<T>>
void apf::NonCausalBlockDelayLine< T, Container >::advance ( )
template<typename T , typename Container = std::vector<T>>
template<typename Iterator >
void apf::NonCausalBlockDelayLine< T, Container >::write_block ( Iterator  source)
template<typename T , typename Container = std::vector<T>>
pointer apf::NonCausalBlockDelayLine< T, Container >::get_write_pointer ( ) const
template<typename T , typename Container = std::vector<T>>
bool apf::NonCausalBlockDelayLine< T, Container >::delay_is_valid ( difference_type  delay,
difference_type &  corrected 
) const
inline

Check if a given delay is valid.

Parameters
delayDesired delay
[out]correctedIf valid, the same as delay, if too low/high, the minimum/maximum possible delay, respectively.
Returns
true if delay is valid.
See also
BlockDelayLine::delay_is_valid()

Definition at line 266 of file blockdelayline.h.

template<typename T , typename Container = std::vector<T>>
bool apf::NonCausalBlockDelayLine< T, Container >::delay_is_valid ( difference_type  delay) const
inline

Return true if delay is valid.

See also
delay_is_valid()

Definition at line 281 of file blockdelayline.h.

References apf::BlockDelayLine< T, Container >::delay_is_valid().

template<typename T , typename Container = std::vector<T>>
template<typename Iterator >
bool apf::NonCausalBlockDelayLine< T, Container >::read_block ( Iterator  destination,
difference_type  delay 
) const
inline
See also
BlockDelayLine::read_block()

Definition at line 289 of file blockdelayline.h.

template<typename T , typename Container = std::vector<T>>
template<typename Iterator >
bool apf::NonCausalBlockDelayLine< T, Container >::read_block ( Iterator  destination,
difference_type  delay,
weight 
) const
inline
See also
BlockDelayLine::read_block()

Definition at line 298 of file blockdelayline.h.

template<typename T , typename Container = std::vector<T>>
circulator apf::NonCausalBlockDelayLine< T, Container >::get_read_circulator ( difference_type  delay = 0) const
inline
See also
BlockDelayLine::get_read_circulator()

Definition at line 306 of file blockdelayline.h.


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