templated sample data type
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace trnr {
|
||||
template <typename t_sample>
|
||||
// Bandpass filter based on YBandpass by Chris Johnson
|
||||
class ybandpass {
|
||||
public:
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
{
|
||||
F = value;
|
||||
}
|
||||
void processblock(double** inputs, double** outputs, int blockSize)
|
||||
void processblock(t_sample** inputs, t_sample** outputs, int blockSize)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace trnr {
|
||||
template <typename t_sample>
|
||||
// Highpass filter based on YHighpass by Chris Johnson
|
||||
class yhighpass {
|
||||
public:
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
{
|
||||
F = value;
|
||||
}
|
||||
void processblock(double** inputs, double** outputs, int blockSize)
|
||||
void processblock(t_sample** inputs, t_sample** outputs, int blockSize)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace trnr {
|
||||
template <typename t_sample>
|
||||
// Lowpass filter based on YLowpass by Chris Johnson
|
||||
class ylowpass {
|
||||
public:
|
||||
@@ -70,12 +71,12 @@ public:
|
||||
{
|
||||
F = value;
|
||||
}
|
||||
void processblock(double** inputs, double** outputs, int blockSize)
|
||||
void processblock(t_sample** inputs, t_sample** outputs, int blockSize)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
double* out1 = outputs[0];
|
||||
double* out2 = outputs[1];
|
||||
t_sample* in1 = inputs[0];
|
||||
t_sample* in2 = inputs[1];
|
||||
t_sample* out1 = outputs[0];
|
||||
t_sample* out2 = outputs[1];
|
||||
|
||||
int inFramesToProcess = blockSize;
|
||||
double overallscale = 1.0;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
template <typename t_sample>
|
||||
namespace trnr {
|
||||
// Notch filter based on YNotch by Chris Johnson
|
||||
class ynotch {
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
{
|
||||
F = value;
|
||||
}
|
||||
void processblock(double** inputs, double** outputs, int blockSize)
|
||||
void processblock(t_sample** inputs, t_sample** outputs, int blockSize)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "ynotch.h"
|
||||
|
||||
namespace trnr {
|
||||
template <typename t_sample>
|
||||
|
||||
enum filter_types {
|
||||
lowpass = 0,
|
||||
@@ -75,7 +76,7 @@ public:
|
||||
notch.set_mix(value);
|
||||
}
|
||||
|
||||
void process_block(double** inputs, double** outputs, int block_size) {
|
||||
void process_block(t_sample** inputs, t_sample** outputs, int block_size) {
|
||||
|
||||
switch (filter_type) {
|
||||
case filter_types::lowpass:
|
||||
|
||||
Reference in New Issue
Block a user