/*
* 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 {
/*! api {{{
* ##### Brickworks::bufFill
* ```>>> */
template
void bufFill(
std::array dest,
float k,
int nSamples);
/*! <<<```
*
* ##### Brickworks::bufNeg
* ```>>> */
template
void bufNeg(
std::array dest,
std::array src,
int nSamples);
/*! <<<```
*
* ##### Brickworks::bufAdd
* ```>>> */
template
void bufAdd(
std::array dest,
std::array src,
float k,
int nSamples);
/*! <<<```
*
* ##### Brickworks::bufScale
* ```>>> */
template
void bufScale(
std::array dest,
std::array src,
float k,
int nSamples);
/*! <<<```
*
* ##### Brickworks::bufMix
* ```>>> */
template
void bufMix(
std::array dest,
std::array src1,
std::array src2,
int nSamples);
/*! <<<```
*
* ##### Brickworks::bufMul
* ```>>> */
template
void bufMul(
std::array dest,
std::array src1,
std::array src2,
int nSamples);
/*! <<<```
* }}} */
/*** Implementation ***/
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
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