3 #ifndef VISR_LIBRBBL_MULTICHANNEL_CONVOLVER_UNIFORM_HPP_INCLUDED 4 #define VISR_LIBRBBL_MULTICHANNEL_CONVOLVER_UNIFORM_HPP_INCLUDED 14 #include <initializer_list> 30 template<
typename SampleType >
50 std::size_t numberOfOutputs,
51 std::size_t blockLength,
52 std::size_t maxFilterLength,
53 std::size_t maxRoutingPoints,
54 std::size_t maxFilterEntries,
57 std::size_t alignment = 0,
58 char const * fftImplementation =
"default" );
65 std::size_t
numberOfInputs()
const {
return mCoreConvolver.numberOfInputs(); }
69 std::size_t
blockLength()
const {
return mCoreConvolver.blockLength(); }
79 void process(
SampleType const *
const input, std::size_t inputStride,
80 SampleType *
const output, std::size_t outputStride,
81 std::size_t alignment = 0 );
90 void clearRoutingTable( );
113 void setRoutingEntry( std::size_t inputIdx, std::size_t outputIdx, std::size_t filterIdx,
SampleType gain );
118 bool removeRoutingEntry( std::size_t inputIdx, std::size_t outputIdx );
133 void clearFilters( );
146 void setImpulseResponse(
SampleType const * ir, std::size_t filterLength, std::size_t filterIdx, std::size_t alignment = 0 );
152 void processOutputs(
SampleType *
const output, std::size_t outputChannelStride,
153 std::size_t alignment );
159 explicit RoutingEntry( std::size_t in, std::size_t out, std::size_t filter,
SampleType gain = 1.0f )
160 : inputIdx( in ), outputIdx( out ), filterIdx( filter ), gainLinear( gain )
163 std::size_t inputIdx;
164 std::size_t outputIdx;
165 std::size_t filterIdx;
173 struct CompareRoutings
175 bool operator()( RoutingEntry
const & lhs, RoutingEntry
const & rhs )
const 177 if( lhs.outputIdx == rhs.outputIdx )
179 return lhs.inputIdx < rhs.inputIdx;
183 return lhs.outputIdx < rhs.outputIdx;
188 using RoutingTable = std::multiset<RoutingEntry, CompareRoutings>;
190 RoutingTable mRoutingTable;
192 std::size_t
const mMaxNumberOfRoutingPoints;
200 #endif // #ifndef VISR_LIBRBBL_MULTICHANNEL_CONVOLVER_UNIFORM_HPP_INCLUDED
Definition: filter_routing.hpp:22
Definition: options.cpp:10
float SampleType
Definition: constants.hpp:14
Definition: filter_routing.hpp:81