Audio Processing Framework (APF) version 0.5.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.

Member Typedef Documentation

◆ difference_type

template<typename T , typename Container = std::vector<T>>
using apf::NonCausalBlockDelayLine< T, Container >::difference_type = typename _base::circulator::difference_type

Definition at line 232 of file blockdelayline.h.

◆ size_type

template<typename T , typename Container = std::vector<T>>
using apf::BlockDelayLine< T, Container >::size_type = typename Container::size_type

Definition at line 50 of file blockdelayline.h.

◆ circulator

template<typename T , typename Container = std::vector<T>>
using apf::BlockDelayLine< T, Container >::circulator = apf::circular_iterator<typename Container::iterator>

Definition at line 53 of file blockdelayline.h.

Constructor & Destructor Documentation

◆ NonCausalBlockDelayLine()

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.

Member Function Documentation

◆ advance()

template<typename T , typename Container = std::vector<T>>
void apf::NonCausalBlockDelayLine< T, Container >::advance ( )

◆ write_block()

template<typename T , typename Container = std::vector<T>>
template<typename Iterator >
void apf::NonCausalBlockDelayLine< T, Container >::write_block ( Iterator  source)

◆ get_write_pointer()

template<typename T , typename Container = std::vector<T>>
pointer apf::NonCausalBlockDelayLine< T, Container >::get_write_pointer ( ) const

◆ delay_is_valid() [1/2]

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.

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

Referenced by apf::NonCausalBlockDelayLine< T, Container >::delay_is_valid().

◆ delay_is_valid() [2/2]

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::NonCausalBlockDelayLine< T, Container >::delay_is_valid().

◆ read_block() [1/2]

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

◆ read_block() [2/2]

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

◆ get_read_circulator()

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

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