change C++ process() using std::array in bw_src

This commit is contained in:
Stefano D'Angelo 2023-09-21 17:05:37 +02:00
parent fc91d59f57
commit 4bc7eda8f3
2 changed files with 5 additions and 5 deletions

2
TODO
View File

@ -10,7 +10,6 @@ code:
general: general:
* mem req -> return value of set sample rate? or sample rate argument of mem req? * mem req -> return value of set sample rate? or sample rate argument of mem req?
* c++ get coeffs/state? or public? src nIn/OutSamples case (array vs single value), delay read/write, process1? process single? * c++ get coeffs/state? or public? src nIn/OutSamples case (array vs single value), delay read/write, process1? process single?
* common smoothing policy (as control rate as possible?) - smoothing control?
* IMPLEMENTATION prepocessor def??? * IMPLEMENTATION prepocessor def???
semi-specific: semi-specific:
* max_delay -> set sample rate? see reverb * max_delay -> set sample rate? see reverb
@ -78,6 +77,7 @@ code:
* ring mod fx module? * ring mod fx module?
* bitcrusher module? * bitcrusher module?
* return output std::array rather than have it as input argument? * return output std::array rather than have it as input argument?
* common smoothing policy (as control rate as possible?) - smoothing control?
build system: build system:
* make makefiles handle paths with spaces etc * make makefiles handle paths with spaces etc

View File

@ -540,8 +540,8 @@ public:
void process( void process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x, std::array<const float * BW_RESTRICT, N_CHANNELS> x,
std::array<float * BW_RESTRICT, N_CHANNELS> y, std::array<float * BW_RESTRICT, N_CHANNELS> y,
std::array<size_t * BW_RESTRICT, N_CHANNELS> nInSamples, std::array<size_t, N_CHANNELS> & nInSamples,
std::array<size_t * BW_RESTRICT, N_CHANNELS> nOutSamples); std::array<size_t, N_CHANNELS> & nOutSamples);
/*! <<<... /*! <<<...
* } * }
* ``` * ```
@ -612,8 +612,8 @@ template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::process( inline void SRC<N_CHANNELS>::process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x, std::array<const float * BW_RESTRICT, N_CHANNELS> x,
std::array<float * BW_RESTRICT, N_CHANNELS> y, std::array<float * BW_RESTRICT, N_CHANNELS> y,
std::array<size_t * BW_RESTRICT, N_CHANNELS> nInSamples, std::array<size_t, N_CHANNELS> & nInSamples,
std::array<size_t * BW_RESTRICT, N_CHANNELS> nOutSamples) { std::array<size_t, N_CHANNELS> & nOutSamples) {
process(x.data(), y.data(), nInSamples.data(), nOutSamples.data()); process(x.data(), y.data(), nInSamples.data(), nOutSamples.data());
} }