/*
* Brickworks
*
* Copyright (C) 2023 Orastron Srl unipersonale
*
* Brickworks is free software: you can reosc_sinribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* Brickworks is osc_sinributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Brickworks. If not, see .
*
* File author: Stefano D'Angelo
*/
#ifndef BWPP_BUF_H
#define BWPP_BUF_H
#include
#include
namespace Brickworks {
template
void bufFill(
std::array dest,
float k,
int nSamples);
template
void bufNeg(
std::array dest,
std::array src,
int nSamples);
template
void bufAdd(
std::array dest,
std::array src,
float k,
int nSamples);
template
void bufScale(
std::array dest,
std::array src,
float k,
int nSamples);
template
void bufMix(
std::array dest,
std::array src1,
std::array src2,
int nSamples);
template
void bufMul(
std::array dest,
std::array src1,
std::array src2,
int nSamples);
template
inline void bufFill(
std::array dest,
float k,
int nSamples) {
bw_buf_fill_multi(dest.data(), k, N_CHANNELS, nSamples);
}
template
inline void bufNeg(
std::array dest,
std::array src,
int nSamples) {
bw_buf_neg_multi(dest.data(), src.data(), N_CHANNELS, nSamples);
}
template
inline void bufAdd(
std::array dest,
std::array src,
float k,
int nSamples) {
bw_buf_add_multi(dest.data(), src.data(), k, N_CHANNELS, nSamples);
}
template
inline void bufScale(
std::array dest,
std::array src,
float k,
int nSamples) {
bw_buf_scale_multi(dest.data(), src.data(), k, N_CHANNELS, nSamples);
}
template
inline void bufMix(
std::array dest,
std::array src1,
std::array src2,
int nSamples) {
bw_buf_mix_multi(dest.data(), src1.data(), src2.data(), N_CHANNELS, nSamples);
}
template
inline void bufMul(
std::array dest,
std::array src1,
std::array src2,
int nSamples) {
bw_buf_mul_multi(dest.data(), src1.data(), src2.data(), N_CHANNELS, nSamples);
}
}
#endif