1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-21 12:26:34 -04:00

WDSP: generator: replaced static methods (RXA)

This commit is contained in:
f4exb 2024-07-24 05:24:37 +02:00
parent 49dc91cb6b
commit 8842b56080
11 changed files with 271 additions and 285 deletions

View File

@ -32,7 +32,6 @@ warren@wpratt.com
#include "meter.hpp" #include "meter.hpp"
#include "shift.hpp" #include "shift.hpp"
#include "resample.hpp" #include "resample.hpp"
#include "gen.hpp"
#include "bandpass.hpp" #include "bandpass.hpp"
#include "bps.hpp" #include "bps.hpp"
#include "nbp.hpp" #include "nbp.hpp"
@ -139,15 +138,6 @@ RXA* RXA::create_rxa (
0, // select ncoef automatically 0, // select ncoef automatically
1.0); // gain 1.0); // gain
// Signal generator
rxa->gen0 = GEN::create_gen (
0, // run
rxa->dsp_size, // buffer size
rxa->midbuff, // input buffer
rxa->midbuff, // output buffer
rxa->dsp_rate, // sample rate
2); // mode
// Input meter - ADC // Input meter - ADC
rxa->adcmeter = METER::create_meter ( rxa->adcmeter = METER::create_meter (
0, // run 0, // run
@ -598,7 +588,6 @@ void RXA::destroy_rxa (RXA *rxa)
NBP::destroy_nbp (rxa->nbp0); NBP::destroy_nbp (rxa->nbp0);
NOTCHDB::destroy_notchdb (rxa->ndb); NOTCHDB::destroy_notchdb (rxa->ndb);
METER::destroy_meter (rxa->adcmeter); METER::destroy_meter (rxa->adcmeter);
GEN::destroy_gen (rxa->gen0);
delete (rxa->rsmpin); delete (rxa->rsmpin);
delete (rxa->shift); delete (rxa->shift);
delete (rxa->nob); delete (rxa->nob);
@ -618,7 +607,6 @@ void RXA::flush_rxa (RXA *rxa)
rxa->nob->flush(); rxa->nob->flush();
rxa->shift->flush(); rxa->shift->flush();
rxa->rsmpin->flush(); rxa->rsmpin->flush();
GEN::flush_gen (rxa->gen0);
METER::flush_meter (rxa->adcmeter); METER::flush_meter (rxa->adcmeter);
NBP::flush_nbp (rxa->nbp0); NBP::flush_nbp (rxa->nbp0);
BPSNBA::flush_bpsnba (rxa->bpsnba); BPSNBA::flush_bpsnba (rxa->bpsnba);
@ -651,7 +639,6 @@ void RXA::xrxa (RXA *rxa)
rxa->nob->execute(); rxa->nob->execute();
rxa->shift->execute(); rxa->shift->execute();
rxa->rsmpin->execute(); rxa->rsmpin->execute();
GEN::xgen (rxa->gen0);
METER::xmeter (rxa->adcmeter); METER::xmeter (rxa->adcmeter);
BPSNBA::xbpsnbain (rxa->bpsnba, 0); BPSNBA::xbpsnbain (rxa->bpsnba, 0);
NBP::xnbp (rxa->nbp0, 0); NBP::xnbp (rxa->nbp0, 0);
@ -765,7 +752,6 @@ void RXA::setDSPSamplerate (RXA *rxa, int dsp_rate)
rxa->rsmpin->setSize(rxa->dsp_insize); rxa->rsmpin->setSize(rxa->dsp_insize);
rxa->rsmpin->setOutRate(rxa->dsp_rate); rxa->rsmpin->setOutRate(rxa->dsp_rate);
// dsp_rate blocks // dsp_rate blocks
GEN::setSamplerate_gen (rxa->gen0, rxa->dsp_rate);
METER::setSamplerate_meter (rxa->adcmeter, rxa->dsp_rate); METER::setSamplerate_meter (rxa->adcmeter, rxa->dsp_rate);
NBP::setSamplerate_nbp (rxa->nbp0, rxa->dsp_rate); NBP::setSamplerate_nbp (rxa->nbp0, rxa->dsp_rate);
BPSNBA::setSamplerate_bpsnba (rxa->bpsnba, rxa->dsp_rate); BPSNBA::setSamplerate_bpsnba (rxa->bpsnba, rxa->dsp_rate);
@ -829,8 +815,6 @@ void RXA::setDSPBuffsize (RXA *rxa, int dsp_size)
rxa->rsmpin->setBuffers(rxa->inbuff, rxa->midbuff); rxa->rsmpin->setBuffers(rxa->inbuff, rxa->midbuff);
rxa->rsmpin->setSize(rxa->dsp_insize); rxa->rsmpin->setSize(rxa->dsp_insize);
// dsp_size blocks // dsp_size blocks
GEN::setBuffers_gen (rxa->gen0, rxa->midbuff, rxa->midbuff);
GEN::setSize_gen (rxa->gen0, rxa->dsp_size);
METER::setBuffers_meter (rxa->adcmeter, rxa->midbuff); METER::setBuffers_meter (rxa->adcmeter, rxa->midbuff);
METER::setSize_meter (rxa->adcmeter, rxa->dsp_size); METER::setSize_meter (rxa->adcmeter, rxa->dsp_size);
NBP::setBuffers_nbp (rxa->nbp0, rxa->midbuff, rxa->midbuff); NBP::setBuffers_nbp (rxa->nbp0, rxa->midbuff, rxa->midbuff);

View File

@ -37,7 +37,6 @@ namespace WDSP {
class METER; class METER;
class SHIFT; class SHIFT;
class RESAMPLE; class RESAMPLE;
class GEN;
class BANDPASS; class BANDPASS;
class BPS; class BPS;
class NOTCHDB; class NOTCHDB;
@ -102,7 +101,6 @@ public:
NOB *nob; NOB *nob;
SHIFT *shift; SHIFT *shift;
RESAMPLE *rsmpin; RESAMPLE *rsmpin;
GEN *gen0;
METER *adcmeter; METER *adcmeter;
NOTCHDB *ndb; NOTCHDB *ndb;
NBP *nbp0; NBP *nbp0;

View File

@ -93,7 +93,7 @@ TXA* TXA::create_txa (
0, // select ncoef automatically 0, // select ncoef automatically
1.0); // gain 1.0); // gain
txa->gen0.p = GEN::create_gen ( txa->gen0.p = new GEN(
0, // run 0, // run
txa->dsp_size, // buffer size txa->dsp_size, // buffer size
txa->midbuff, // input buffer txa->midbuff, // input buffer
@ -397,7 +397,7 @@ TXA* TXA::create_txa (
std::max(2048, txa->dsp_size), // number coefficients for bandpass filter std::max(2048, txa->dsp_size), // number coefficients for bandpass filter
0); // minimum phase flag 0); // minimum phase flag
txa->gen1.p = GEN::create_gen ( txa->gen1.p = new GEN(
0, // run 0, // run
txa->dsp_size, // buffer size txa->dsp_size, // buffer size
txa->midbuff, // input buffer txa->midbuff, // input buffer
@ -527,7 +527,7 @@ void TXA::destroy_txa (TXA *txa)
SIPHON::destroy_siphon (txa->sip1.p); SIPHON::destroy_siphon (txa->sip1.p);
METER::destroy_meter (txa->alcmeter.p); METER::destroy_meter (txa->alcmeter.p);
USLEW::destroy_uslew (txa->uslew.p); USLEW::destroy_uslew (txa->uslew.p);
GEN::destroy_gen (txa->gen1.p); delete (txa->gen1.p);
FMMOD::destroy_fmmod (txa->fmmod.p); FMMOD::destroy_fmmod (txa->fmmod.p);
AMMOD::destroy_ammod (txa->ammod.p); AMMOD::destroy_ammod (txa->ammod.p);
WCPAGC::destroy_wcpagc (txa->alc.p); WCPAGC::destroy_wcpagc (txa->alc.p);
@ -548,7 +548,7 @@ void TXA::destroy_txa (TXA *txa)
METER::destroy_meter (txa->micmeter.p); METER::destroy_meter (txa->micmeter.p);
PHROT::destroy_phrot (txa->phrot.p); PHROT::destroy_phrot (txa->phrot.p);
PANEL::destroy_panel (txa->panel.p); PANEL::destroy_panel (txa->panel.p);
GEN::destroy_gen (txa->gen0.p); delete (txa->gen0.p);
delete (txa->rsmpin.p); delete (txa->rsmpin.p);
delete[] (txa->midbuff); delete[] (txa->midbuff);
delete[] (txa->outbuff); delete[] (txa->outbuff);
@ -562,7 +562,7 @@ void TXA::flush_txa (TXA* txa)
std::fill(txa->outbuff, txa->outbuff + 1 * txa->dsp_outsize * 2, 0); std::fill(txa->outbuff, txa->outbuff + 1 * txa->dsp_outsize * 2, 0);
std::fill(txa->midbuff, txa->midbuff + 2 * txa->dsp_size * 2, 0); std::fill(txa->midbuff, txa->midbuff + 2 * txa->dsp_size * 2, 0);
txa->rsmpin.p->flush(); txa->rsmpin.p->flush();
GEN::flush_gen (txa->gen0.p); txa->gen0.p->flush();
PANEL::flush_panel (txa->panel.p); PANEL::flush_panel (txa->panel.p);
PHROT::flush_phrot (txa->phrot.p); PHROT::flush_phrot (txa->phrot.p);
METER::flush_meter (txa->micmeter.p); METER::flush_meter (txa->micmeter.p);
@ -583,7 +583,7 @@ void TXA::flush_txa (TXA* txa)
WCPAGC::flush_wcpagc (txa->alc.p); WCPAGC::flush_wcpagc (txa->alc.p);
AMMOD::flush_ammod (txa->ammod.p); AMMOD::flush_ammod (txa->ammod.p);
FMMOD::flush_fmmod (txa->fmmod.p); FMMOD::flush_fmmod (txa->fmmod.p);
GEN::flush_gen (txa->gen1.p); txa->gen1.p->flush();
USLEW::flush_uslew (txa->uslew.p); USLEW::flush_uslew (txa->uslew.p);
METER::flush_meter (txa->alcmeter.p); METER::flush_meter (txa->alcmeter.p);
SIPHON::flush_siphon (txa->sip1.p); SIPHON::flush_siphon (txa->sip1.p);
@ -596,7 +596,7 @@ void TXA::flush_txa (TXA* txa)
void xtxa (TXA* txa) void xtxa (TXA* txa)
{ {
txa->rsmpin.p->execute(); // input resampler txa->rsmpin.p->execute(); // input resampler
GEN::xgen (txa->gen0.p); // input signal generator txa->gen0.p->execute(); // input signal generator
PANEL::xpanel (txa->panel.p); // includes MIC gain PANEL::xpanel (txa->panel.p); // includes MIC gain
PHROT::xphrot (txa->phrot.p); // phase rotator PHROT::xphrot (txa->phrot.p); // phase rotator
METER::xmeter (txa->micmeter.p); // MIC meter METER::xmeter (txa->micmeter.p); // MIC meter
@ -619,7 +619,7 @@ void xtxa (TXA* txa)
AMMOD::xammod (txa->ammod.p); // AM Modulator AMMOD::xammod (txa->ammod.p); // AM Modulator
EMPHP::xemphp (txa->preemph.p, 1); // FM pre-emphasis (second option) EMPHP::xemphp (txa->preemph.p, 1); // FM pre-emphasis (second option)
FMMOD::xfmmod (txa->fmmod.p); // FM Modulator FMMOD::xfmmod (txa->fmmod.p); // FM Modulator
GEN::xgen (txa->gen1.p); // output signal generator (TUN and Two-tone) txa->gen1.p->execute(); // output signal generator (TUN and Two-tone)
USLEW::xuslew (txa->uslew.p); // up-slew for AM, FM, and gens USLEW::xuslew (txa->uslew.p); // up-slew for AM, FM, and gens
METER::xmeter (txa->alcmeter.p); // ALC Meter METER::xmeter (txa->alcmeter.p); // ALC Meter
SIPHON::xsiphon (txa->sip1.p, 0); // siphon data for display SIPHON::xsiphon (txa->sip1.p, 0); // siphon data for display
@ -694,7 +694,7 @@ void TXA::setDSPSamplerate (TXA *txa, int dsp_rate)
txa->rsmpin.p->setSize(txa->dsp_insize); txa->rsmpin.p->setSize(txa->dsp_insize);
txa->rsmpin.p->setOutRate(txa->dsp_rate); txa->rsmpin.p->setOutRate(txa->dsp_rate);
// dsp_rate blocks // dsp_rate blocks
GEN::setSamplerate_gen (txa->gen0.p, txa->dsp_rate); txa->gen0.p->setSamplerate(txa->dsp_rate);
PANEL::setSamplerate_panel (txa->panel.p, txa->dsp_rate); PANEL::setSamplerate_panel (txa->panel.p, txa->dsp_rate);
PHROT::setSamplerate_phrot (txa->phrot.p, txa->dsp_rate); PHROT::setSamplerate_phrot (txa->phrot.p, txa->dsp_rate);
METER::setSamplerate_meter (txa->micmeter.p, txa->dsp_rate); METER::setSamplerate_meter (txa->micmeter.p, txa->dsp_rate);
@ -715,7 +715,7 @@ void TXA::setDSPSamplerate (TXA *txa, int dsp_rate)
WCPAGC::setSamplerate_wcpagc (txa->alc.p, txa->dsp_rate); WCPAGC::setSamplerate_wcpagc (txa->alc.p, txa->dsp_rate);
AMMOD::setSamplerate_ammod (txa->ammod.p, txa->dsp_rate); AMMOD::setSamplerate_ammod (txa->ammod.p, txa->dsp_rate);
FMMOD::setSamplerate_fmmod (txa->fmmod.p, txa->dsp_rate); FMMOD::setSamplerate_fmmod (txa->fmmod.p, txa->dsp_rate);
GEN::setSamplerate_gen (txa->gen1.p, txa->dsp_rate); txa->gen1.p->setSamplerate(txa->dsp_rate);
USLEW::setSamplerate_uslew (txa->uslew.p, txa->dsp_rate); USLEW::setSamplerate_uslew (txa->uslew.p, txa->dsp_rate);
METER::setSamplerate_meter (txa->alcmeter.p, txa->dsp_rate); METER::setSamplerate_meter (txa->alcmeter.p, txa->dsp_rate);
SIPHON::setSamplerate_siphon (txa->sip1.p, txa->dsp_rate); SIPHON::setSamplerate_siphon (txa->sip1.p, txa->dsp_rate);
@ -754,8 +754,8 @@ void TXA::setDSPBuffsize (TXA *txa, int dsp_size)
txa->rsmpin.p->setBuffers(txa->inbuff, txa->midbuff); txa->rsmpin.p->setBuffers(txa->inbuff, txa->midbuff);
txa->rsmpin.p->setSize(txa->dsp_insize); txa->rsmpin.p->setSize(txa->dsp_insize);
// dsp_size blocks // dsp_size blocks
GEN::setBuffers_gen (txa->gen0.p, txa->midbuff, txa->midbuff); txa->gen0.p->setBuffers(txa->midbuff, txa->midbuff);
GEN::setSize_gen (txa->gen0.p, txa->dsp_size); txa->gen0.p->setSize(txa->dsp_size);
PANEL::setBuffers_panel (txa->panel.p, txa->midbuff, txa->midbuff); PANEL::setBuffers_panel (txa->panel.p, txa->midbuff, txa->midbuff);
PANEL::setSize_panel (txa->panel.p, txa->dsp_size); PANEL::setSize_panel (txa->panel.p, txa->dsp_size);
PHROT::setBuffers_phrot (txa->phrot.p, txa->midbuff, txa->midbuff); PHROT::setBuffers_phrot (txa->phrot.p, txa->midbuff, txa->midbuff);
@ -796,8 +796,8 @@ void TXA::setDSPBuffsize (TXA *txa, int dsp_size)
AMMOD::setSize_ammod (txa->ammod.p, txa->dsp_size); AMMOD::setSize_ammod (txa->ammod.p, txa->dsp_size);
FMMOD::setBuffers_fmmod (txa->fmmod.p, txa->midbuff, txa->midbuff); FMMOD::setBuffers_fmmod (txa->fmmod.p, txa->midbuff, txa->midbuff);
FMMOD::setSize_fmmod (txa->fmmod.p, txa->dsp_size); FMMOD::setSize_fmmod (txa->fmmod.p, txa->dsp_size);
GEN::setBuffers_gen (txa->gen1.p, txa->midbuff, txa->midbuff); txa->gen1.p->setBuffers(txa->midbuff, txa->midbuff);
GEN::setSize_gen (txa->gen1.p, txa->dsp_size); txa->gen1.p->setSize(txa->dsp_size);
USLEW::setBuffers_uslew (txa->uslew.p, txa->midbuff, txa->midbuff); USLEW::setBuffers_uslew (txa->uslew.p, txa->midbuff, txa->midbuff);
USLEW::setSize_uslew (txa->uslew.p, txa->dsp_size); USLEW::setSize_uslew (txa->uslew.p, txa->dsp_size);
METER::setBuffers_meter (txa->alcmeter.p, txa->midbuff); METER::setBuffers_meter (txa->alcmeter.p, txa->midbuff);

View File

@ -27,7 +27,6 @@ warren@wpratt.com
#include "comm.hpp" #include "comm.hpp"
#include "anb.hpp" #include "anb.hpp"
#include "RXA.hpp"
#define MAX_TAU (0.01) // maximum transition time, signal<->zero (slew time) #define MAX_TAU (0.01) // maximum transition time, signal<->zero (slew time)
#define MAX_ADVTIME (0.01) // maximum deadtime (zero output) in advance of detected noise #define MAX_ADVTIME (0.01) // maximum deadtime (zero output) in advance of detected noise

View File

@ -32,8 +32,6 @@ warren@wpratt.com
namespace WDSP { namespace WDSP {
class RXA;
class WDSP_API ANB class WDSP_API ANB
{ {
public: public:

View File

@ -28,145 +28,151 @@ warren@wpratt.com
#include "comm.hpp" #include "comm.hpp"
#include "gen.hpp" #include "gen.hpp"
#include "RXA.hpp"
#include "TXA.hpp" #include "TXA.hpp"
namespace WDSP { namespace WDSP {
void GEN::calc_tone (GEN *a) void GEN::calc_tone()
{ {
a->tone.phs = 0.0; tone.phs = 0.0;
a->tone.delta = TWOPI * a->tone.freq / a->rate; tone.delta = TWOPI * tone.freq / rate;
a->tone.cosdelta = cos (a->tone.delta); tone.cosdelta = cos (tone.delta);
a->tone.sindelta = sin (a->tone.delta); tone.sindelta = sin (tone.delta);
} }
void GEN::calc_tt (GEN *a) void GEN::calc_tt()
{ {
a->tt.phs1 = 0.0; tt.phs1 = 0.0;
a->tt.phs2 = 0.0; tt.phs2 = 0.0;
a->tt.delta1 = TWOPI * a->tt.f1 / a->rate; tt.delta1 = TWOPI * tt.f1 / rate;
a->tt.delta2 = TWOPI * a->tt.f2 / a->rate; tt.delta2 = TWOPI * tt.f2 / rate;
a->tt.cosdelta1 = cos (a->tt.delta1); tt.cosdelta1 = cos (tt.delta1);
a->tt.cosdelta2 = cos (a->tt.delta2); tt.cosdelta2 = cos (tt.delta2);
a->tt.sindelta1 = sin (a->tt.delta1); tt.sindelta1 = sin (tt.delta1);
a->tt.sindelta2 = sin (a->tt.delta2); tt.sindelta2 = sin (tt.delta2);
} }
void GEN::calc_sweep (GEN *a) void GEN::calc_sweep()
{ {
a->sweep.phs = 0.0; sweep.phs = 0.0;
a->sweep.dphs = TWOPI * a->sweep.f1 / a->rate; sweep.dphs = TWOPI * sweep.f1 / rate;
a->sweep.d2phs = TWOPI * a->sweep.sweeprate / (a->rate * a->rate); sweep.d2phs = TWOPI * sweep.sweeprate / (rate * rate);
a->sweep.dphsmax = TWOPI * a->sweep.f2 / a->rate; sweep.dphsmax = TWOPI * sweep.f2 / rate;
} }
void GEN::calc_sawtooth (GEN *a) void GEN::calc_sawtooth()
{ {
a->saw.period = 1.0 / a->saw.f; saw.period = 1.0 / saw.f;
a->saw.delta = 1.0 / a->rate; saw.delta = 1.0 / rate;
a->saw.t = 0.0; saw.t = 0.0;
} }
void GEN::calc_triangle (GEN *a) void GEN::calc_triangle()
{ {
a->tri.period = 1.0 / a->tri.f; tri.period = 1.0 / tri.f;
a->tri.half = 0.5 * a->tri.period; tri.half = 0.5 * tri.period;
a->tri.delta = 1.0 / a->rate; tri.delta = 1.0 / rate;
a->tri.t = 0.0; tri.t = 0.0;
a->tri.t1 = 0.0; tri.t1 = 0.0;
} }
void GEN::calc_pulse (GEN *a) void GEN::calc_pulse ()
{ {
int i; int i;
float delta, theta; float delta, theta;
a->pulse.pperiod = 1.0 / a->pulse.pf; pulse.pperiod = 1.0 / pulse.pf;
a->pulse.tphs = 0.0; pulse.tphs = 0.0;
a->pulse.tdelta = TWOPI * a->pulse.tf / a->rate; pulse.tdelta = TWOPI * pulse.tf / rate;
a->pulse.tcosdelta = cos (a->pulse.tdelta); pulse.tcosdelta = cos (pulse.tdelta);
a->pulse.tsindelta = sin (a->pulse.tdelta); pulse.tsindelta = sin (pulse.tdelta);
a->pulse.pntrans = (int)(a->pulse.ptranstime * a->rate); pulse.pntrans = (int)(pulse.ptranstime * rate);
a->pulse.pnon = (int)(a->pulse.pdutycycle * a->pulse.pperiod * a->rate); pulse.pnon = (int)(pulse.pdutycycle * pulse.pperiod * rate);
a->pulse.pnoff = (int)(a->pulse.pperiod * a->rate) - a->pulse.pnon - 2 * a->pulse.pntrans; pulse.pnoff = (int)(pulse.pperiod * rate) - pulse.pnon - 2 * pulse.pntrans;
if (a->pulse.pnoff < 0) a->pulse.pnoff = 0;
a->pulse.pcount = a->pulse.pnoff; if (pulse.pnoff < 0)
a->pulse.state = 0; pulse.pnoff = 0;
a->pulse.ctrans = new float[a->pulse.pntrans + 1]; // (float *) malloc0 ((a->pulse.pntrans + 1) * sizeof (float));
delta = PI / (float)a->pulse.pntrans; pulse.pcount = pulse.pnoff;
pulse.state = 0;
pulse.ctrans = new float[pulse.pntrans + 1]; // (float *) malloc0 ((pulse.pntrans + 1) * sizeof (float));
delta = PI / (float)pulse.pntrans;
theta = 0.0; theta = 0.0;
for (i = 0; i <= a->pulse.pntrans; i++) for (i = 0; i <= pulse.pntrans; i++)
{ {
a->pulse.ctrans[i] = 0.5 * (1.0 - cos (theta)); pulse.ctrans[i] = 0.5 * (1.0 - cos (theta));
theta += delta; theta += delta;
} }
} }
void GEN::calc_gen (GEN *a) void GEN::calc()
{ {
calc_tone (a); calc_tone();
calc_tt (a); calc_tt();
calc_sweep (a); calc_sweep();
calc_sawtooth (a); calc_sawtooth();
calc_triangle (a); calc_triangle();
calc_pulse (a); calc_pulse();
} }
void GEN::decalc_gen (GEN *a) void GEN::decalc()
{ {
delete[] (a->pulse.ctrans); delete[] (pulse.ctrans);
} }
GEN* GEN::create_gen (int run, int size, float* in, float* out, int rate, int mode) GEN::GEN(
int _run,
int _size,
float* _in,
float* _out,
int _rate,
int _mode
) :
run(_run),
size(_size),
in(_in),
out(_out),
rate((double) _rate),
mode(_mode)
{ {
GEN *a = new GEN;
a->run = run;
a->size = size;
a->in = in;
a->out = out;
a->rate = (float)rate;
a->mode = mode;
// tone // tone
a->tone.mag = 1.0; tone.mag = 1.0;
a->tone.freq = 1000.0; tone.freq = 1000.0;
// two-tone // two-tone
a->tt.mag1 = 0.5; tt.mag1 = 0.5;
a->tt.mag2 = 0.5; tt.mag2 = 0.5;
a->tt.f1 = + 900.0; tt.f1 = + 900.0;
a->tt.f2 = + 1700.0; tt.f2 = + 1700.0;
// noise // noise
srand ((unsigned int) time (0)); srand ((unsigned int) time (0));
a->noise.mag = 1.0; noise.mag = 1.0;
// sweep // sweep
a->sweep.mag = 1.0; sweep.mag = 1.0;
a->sweep.f1 = -20000.0; sweep.f1 = -20000.0;
a->sweep.f2 = +20000.0; sweep.f2 = +20000.0;
a->sweep.sweeprate = +4000.0; sweep.sweeprate = +4000.0;
// sawtooth // sawtooth
a->saw.mag = 1.0; saw.mag = 1.0;
a->saw.f = 500.0; saw.f = 500.0;
// triangle // triangle
a->tri.mag = 1.0; tri.mag = 1.0;
a->tri.f = 500.0; tri.f = 500.0;
// pulse // pulse
a->pulse.mag = 1.0; pulse.mag = 1.0;
a->pulse.pf = 0.25; pulse.pf = 0.25;
a->pulse.pdutycycle = 0.25; pulse.pdutycycle = 0.25;
a->pulse.ptranstime = 0.002; pulse.ptranstime = 0.002;
a->pulse.tf = 1000.0; pulse.tf = 1000.0;
calc_gen (a); calc();
return a;
} }
void GEN::destroy_gen (GEN *a) GEN::~GEN()
{ {
decalc_gen (a); decalc();
delete (a);
} }
void GEN::flush_gen (GEN *a) void GEN::flush()
{ {
a->pulse.state = 0; pulse.state = 0;
} }
enum pstate enum pstate
@ -177,29 +183,29 @@ enum pstate
DOWN DOWN
}; };
void GEN::xgen (GEN *a) void GEN::execute()
{ {
if (a->run) if (run)
{ {
switch (a->mode) switch (mode)
{ {
case 0: // tone case 0: // tone
{ {
int i; int i;
float t1, t2; float t1, t2;
float cosphase = cos (a->tone.phs); float cosphase = cos (tone.phs);
float sinphase = sin (a->tone.phs); float sinphase = sin (tone.phs);
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
a->out[2 * i + 0] = + a->tone.mag * cosphase; out[2 * i + 0] = + tone.mag * cosphase;
a->out[2 * i + 1] = - a->tone.mag * sinphase; out[2 * i + 1] = - tone.mag * sinphase;
t1 = cosphase; t1 = cosphase;
t2 = sinphase; t2 = sinphase;
cosphase = t1 * a->tone.cosdelta - t2 * a->tone.sindelta; cosphase = t1 * tone.cosdelta - t2 * tone.sindelta;
sinphase = t1 * a->tone.sindelta + t2 * a->tone.cosdelta; sinphase = t1 * tone.sindelta + t2 * tone.cosdelta;
a->tone.phs += a->tone.delta; tone.phs += tone.delta;
if (a->tone.phs >= TWOPI) a->tone.phs -= TWOPI; if (tone.phs >= TWOPI) tone.phs -= TWOPI;
if (a->tone.phs < 0.0 ) a->tone.phs += TWOPI; if (tone.phs < 0.0 ) tone.phs += TWOPI;
} }
break; break;
} }
@ -207,28 +213,28 @@ void GEN::xgen (GEN *a)
{ {
int i; int i;
float tcos, tsin; float tcos, tsin;
float cosphs1 = cos (a->tt.phs1); float cosphs1 = cos (tt.phs1);
float sinphs1 = sin (a->tt.phs1); float sinphs1 = sin (tt.phs1);
float cosphs2 = cos (a->tt.phs2); float cosphs2 = cos (tt.phs2);
float sinphs2 = sin (a->tt.phs2); float sinphs2 = sin (tt.phs2);
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
a->out[2 * i + 0] = + a->tt.mag1 * cosphs1 + a->tt.mag2 * cosphs2; out[2 * i + 0] = + tt.mag1 * cosphs1 + tt.mag2 * cosphs2;
a->out[2 * i + 1] = - a->tt.mag1 * sinphs1 - a->tt.mag2 * sinphs2; out[2 * i + 1] = - tt.mag1 * sinphs1 - tt.mag2 * sinphs2;
tcos = cosphs1; tcos = cosphs1;
tsin = sinphs1; tsin = sinphs1;
cosphs1 = tcos * a->tt.cosdelta1 - tsin * a->tt.sindelta1; cosphs1 = tcos * tt.cosdelta1 - tsin * tt.sindelta1;
sinphs1 = tcos * a->tt.sindelta1 + tsin * a->tt.cosdelta1; sinphs1 = tcos * tt.sindelta1 + tsin * tt.cosdelta1;
a->tt.phs1 += a->tt.delta1; tt.phs1 += tt.delta1;
if (a->tt.phs1 >= TWOPI) a->tt.phs1 -= TWOPI; if (tt.phs1 >= TWOPI) tt.phs1 -= TWOPI;
if (a->tt.phs1 < 0.0 ) a->tt.phs1 += TWOPI; if (tt.phs1 < 0.0 ) tt.phs1 += TWOPI;
tcos = cosphs2; tcos = cosphs2;
tsin = sinphs2; tsin = sinphs2;
cosphs2 = tcos * a->tt.cosdelta2 - tsin * a->tt.sindelta2; cosphs2 = tcos * tt.cosdelta2 - tsin * tt.sindelta2;
sinphs2 = tcos * a->tt.sindelta2 + tsin * a->tt.cosdelta2; sinphs2 = tcos * tt.sindelta2 + tsin * tt.cosdelta2;
a->tt.phs2 += a->tt.delta2; tt.phs2 += tt.delta2;
if (a->tt.phs2 >= TWOPI) a->tt.phs2 -= TWOPI; if (tt.phs2 >= TWOPI) tt.phs2 -= TWOPI;
if (a->tt.phs2 < 0.0 ) a->tt.phs2 += TWOPI; if (tt.phs2 < 0.0 ) tt.phs2 += TWOPI;
} }
break; break;
} }
@ -236,7 +242,7 @@ void GEN::xgen (GEN *a)
{ {
int i; int i;
float r1, r2, c, rad; float r1, r2, c, rad;
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
do do
{ {
@ -245,50 +251,50 @@ void GEN::xgen (GEN *a)
c = r1 * r1 + r2 * r2; c = r1 * r1 + r2 * r2;
} while (c >= 1.0); } while (c >= 1.0);
rad = sqrt (-2.0 * log (c) / c); rad = sqrt (-2.0 * log (c) / c);
a->out[2 * i + 0] = a->noise.mag * rad * r1; out[2 * i + 0] = noise.mag * rad * r1;
a->out[2 * i + 1] = a->noise.mag * rad * r2; out[2 * i + 1] = noise.mag * rad * r2;
} }
break; break;
} }
case 3: // sweep case 3: // sweep
{ {
int i; int i;
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
a->out[2 * i + 0] = + a->sweep.mag * cos(a->sweep.phs); out[2 * i + 0] = + sweep.mag * cos(sweep.phs);
a->out[2 * i + 1] = - a->sweep.mag * sin(a->sweep.phs); out[2 * i + 1] = - sweep.mag * sin(sweep.phs);
a->sweep.phs += a->sweep.dphs; sweep.phs += sweep.dphs;
a->sweep.dphs += a->sweep.d2phs; sweep.dphs += sweep.d2phs;
if (a->sweep.phs >= TWOPI) a->sweep.phs -= TWOPI; if (sweep.phs >= TWOPI) sweep.phs -= TWOPI;
if (a->sweep.phs < 0.0 ) a->sweep.phs += TWOPI; if (sweep.phs < 0.0 ) sweep.phs += TWOPI;
if (a->sweep.dphs > a->sweep.dphsmax) if (sweep.dphs > sweep.dphsmax)
a->sweep.dphs = TWOPI * a->sweep.f1 / a->rate; sweep.dphs = TWOPI * sweep.f1 / rate;
} }
break; break;
} }
case 4: // sawtooth (audio only) case 4: // sawtooth (audio only)
{ {
int i; int i;
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
if (a->saw.t > a->saw.period) a->saw.t -= a->saw.period; if (saw.t > saw.period) saw.t -= saw.period;
a->out[2 * i + 0] = a->saw.mag * (a->saw.t * a->saw.f - 1.0); out[2 * i + 0] = saw.mag * (saw.t * saw.f - 1.0);
a->out[2 * i + 1] = 0.0; out[2 * i + 1] = 0.0;
a->saw.t += a->saw.delta; saw.t += saw.delta;
} }
} }
break; break;
case 5: // triangle (audio only) case 5: // triangle (audio only)
{ {
int i; int i;
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
if (a->tri.t > a->tri.period) a->tri.t1 = a->tri.t -= a->tri.period; if (tri.t > tri.period) tri.t1 = tri.t -= tri.period;
if (a->tri.t > a->tri.half) a->tri.t1 -= a->tri.delta; if (tri.t > tri.half) tri.t1 -= tri.delta;
else a->tri.t1 += a->tri.delta; else tri.t1 += tri.delta;
a->out[2 * i + 0] = a->tri.mag * (4.0 * a->tri.t1 * a->tri.f - 1.0); out[2 * i + 0] = tri.mag * (4.0 * tri.t1 * tri.f - 1.0);
a->out[2 * i + 1] = 0.0; out[2 * i + 1] = 0.0;
a->tri.t += a->tri.delta; tri.t += tri.delta;
} }
} }
break; break;
@ -296,140 +302,140 @@ void GEN::xgen (GEN *a)
{ {
int i; int i;
float t1, t2; float t1, t2;
float cosphase = cos (a->pulse.tphs); float cosphase = cos (pulse.tphs);
float sinphase = sin (a->pulse.tphs); float sinphase = sin (pulse.tphs);
for (i = 0; i < a->size; i++) for (i = 0; i < size; i++)
{ {
if (a->pulse.pnoff != 0) if (pulse.pnoff != 0)
switch (a->pulse.state) switch (pulse.state)
{ {
case OFF: case OFF:
a->out[2 * i + 0] = 0.0; out[2 * i + 0] = 0.0;
if (--a->pulse.pcount == 0) if (--pulse.pcount == 0)
{ {
a->pulse.state = UP; pulse.state = UP;
a->pulse.pcount = a->pulse.pntrans; pulse.pcount = pulse.pntrans;
} }
break; break;
case UP: case UP:
a->out[2 * i + 0] = a->pulse.mag * cosphase * a->pulse.ctrans[a->pulse.pntrans - a->pulse.pcount]; out[2 * i + 0] = pulse.mag * cosphase * pulse.ctrans[pulse.pntrans - pulse.pcount];
if (--a->pulse.pcount == 0) if (--pulse.pcount == 0)
{ {
a->pulse.state = ON; pulse.state = ON;
a->pulse.pcount = a->pulse.pnon; pulse.pcount = pulse.pnon;
} }
break; break;
case ON: case ON:
a->out[2 * i + 0] = a->pulse.mag * cosphase; out[2 * i + 0] = pulse.mag * cosphase;
if (--a->pulse.pcount == 0) if (--pulse.pcount == 0)
{ {
a->pulse.state = DOWN; pulse.state = DOWN;
a->pulse.pcount = a->pulse.pntrans; pulse.pcount = pulse.pntrans;
} }
break; break;
case DOWN: case DOWN:
a->out[2 * i + 0] = a->pulse.mag * cosphase * a->pulse.ctrans[a->pulse.pcount]; out[2 * i + 0] = pulse.mag * cosphase * pulse.ctrans[pulse.pcount];
if (--a->pulse.pcount == 0) if (--pulse.pcount == 0)
{ {
a->pulse.state = OFF; pulse.state = OFF;
a->pulse.pcount = a->pulse.pnoff; pulse.pcount = pulse.pnoff;
} }
break; break;
} }
else else
a->out[2 * i + 0] = 0.0; out[2 * i + 0] = 0.0;
a->out[2 * i + 1] = 0.0; out[2 * i + 1] = 0.0;
t1 = cosphase; t1 = cosphase;
t2 = sinphase; t2 = sinphase;
cosphase = t1 * a->pulse.tcosdelta - t2 * a->pulse.tsindelta; cosphase = t1 * pulse.tcosdelta - t2 * pulse.tsindelta;
sinphase = t1 * a->pulse.tsindelta + t2 * a->pulse.tcosdelta; sinphase = t1 * pulse.tsindelta + t2 * pulse.tcosdelta;
a->pulse.tphs += a->pulse.tdelta; pulse.tphs += pulse.tdelta;
if (a->pulse.tphs >= TWOPI) a->pulse.tphs -= TWOPI; if (pulse.tphs >= TWOPI) pulse.tphs -= TWOPI;
if (a->pulse.tphs < 0.0 ) a->pulse.tphs += TWOPI; if (pulse.tphs < 0.0 ) pulse.tphs += TWOPI;
} }
} }
break; break;
default: // silence default: // silence
{ {
std::fill(a->out, a->out + a->size * 2, 0); std::fill(out, out + size * 2, 0);
break; break;
} }
} }
} }
else if (a->in != a->out) else if (in != out)
std::copy( a->in, a->in + a->size * 2, a->out); std::copy( in, in + size * 2, out);
} }
void GEN::setBuffers_gen (GEN *a, float* in, float* out) void GEN::setBuffers(float* _in, float* _out)
{ {
a->in = in; in = _in;
a->out = out; out = _out;
} }
void GEN::setSamplerate_gen (GEN *a, int rate) void GEN::setSamplerate(int _rate)
{ {
decalc_gen (a); decalc();
a->rate = rate; rate = _rate;
calc_gen (a); calc();
} }
void GEN::setSize_gen (GEN *a, int size) void GEN::setSize(int _size)
{ {
a->size = size; size = _size;
flush_gen (a); flush();
} }
/******************************************************************************************************** /********************************************************************************************************
* * * *
* RXA Properties * * Public Properties *
* * * *
********************************************************************************************************/ ********************************************************************************************************/
// 'PreGen', gen0 // 'PreGen', gen0
void GEN::SetPreGenRun (RXA& rxa, int run) void GEN::SetPreRun(int _run)
{ {
rxa.gen0->run = run; run = _run;
} }
void GEN::SetPreGenMode (RXA& rxa, int mode) void GEN::SetPreMode(int _mode)
{ {
rxa.gen0->mode = mode; mode = _mode;
} }
void GEN::SetPreGenToneMag (RXA& rxa, float mag) void GEN::SetPreToneMag(float mag)
{ {
rxa.gen0->tone.mag = mag; tone.mag = mag;
} }
void GEN::SetPreGenToneFreq (RXA& rxa, float freq) void GEN::SetPreToneFreq(float freq)
{ {
rxa.gen0->tone.freq = freq; tone.freq = freq;
calc_tone (rxa.gen0); calc_tone();
} }
void GEN::SetPreGenNoiseMag (RXA& rxa, float mag) void GEN::SetPreNoiseMag (float mag)
{ {
rxa.gen0->noise.mag = mag; noise.mag = mag;
} }
void GEN::SetPreGenSweepMag (RXA& rxa, float mag) void GEN::SetPreSweepMag(float mag)
{ {
rxa.gen0->sweep.mag = mag; sweep.mag = mag;
} }
void GEN::SetPreGenSweepFreq (RXA& rxa, float freq1, float freq2) void GEN::SetPreSweepFreq(float freq1, float freq2)
{ {
rxa.gen0->sweep.f1 = freq1; sweep.f1 = freq1;
rxa.gen0->sweep.f2 = freq2; sweep.f2 = freq2;
calc_sweep (rxa.gen0); calc_sweep();
} }
void GEN::SetPreGenSweepRate (RXA& rxa, float rate) void GEN::SetPreSweepRate(float rate)
{ {
rxa.gen0->sweep.sweeprate = rate; sweep.sweeprate = rate;
calc_sweep (rxa.gen0); calc_sweep();
} }
@ -459,7 +465,7 @@ void GEN::SetPreGenToneMag (TXA& txa, float mag)
void GEN::SetPreGenToneFreq (TXA& txa, float freq) void GEN::SetPreGenToneFreq (TXA& txa, float freq)
{ {
txa.gen0.p->tone.freq = freq; txa.gen0.p->tone.freq = freq;
calc_tone (txa.gen0.p); txa.gen0.p->calc_tone();
} }
void GEN::SetPreGenNoiseMag (TXA& txa, float mag) void GEN::SetPreGenNoiseMag (TXA& txa, float mag)
@ -476,13 +482,13 @@ void GEN::SetPreGenSweepFreq (TXA& txa, float freq1, float freq2)
{ {
txa.gen0.p->sweep.f1 = freq1; txa.gen0.p->sweep.f1 = freq1;
txa.gen0.p->sweep.f2 = freq2; txa.gen0.p->sweep.f2 = freq2;
calc_sweep (txa.gen0.p); txa.gen0.p->calc_sweep();
} }
void GEN::SetPreGenSweepRate (TXA& txa, float rate) void GEN::SetPreGenSweepRate (TXA& txa, float rate)
{ {
txa.gen0.p->sweep.sweeprate = rate; txa.gen0.p->sweep.sweeprate = rate;
calc_sweep (txa.gen0.p); txa.gen0.p->calc_sweep();
} }
void GEN::SetPreGenSawtoothMag (TXA& txa, float mag) void GEN::SetPreGenSawtoothMag (TXA& txa, float mag)
@ -493,7 +499,7 @@ void GEN::SetPreGenSawtoothMag (TXA& txa, float mag)
void GEN::SetPreGenSawtoothFreq (TXA& txa, float freq) void GEN::SetPreGenSawtoothFreq (TXA& txa, float freq)
{ {
txa.gen0.p->saw.f = freq; txa.gen0.p->saw.f = freq;
calc_sawtooth (txa.gen0.p); txa.gen0.p->calc_sawtooth();
} }
void GEN::SetPreGenTriangleMag (TXA& txa, float mag) void GEN::SetPreGenTriangleMag (TXA& txa, float mag)
@ -504,7 +510,7 @@ void GEN::SetPreGenTriangleMag (TXA& txa, float mag)
void GEN::SetPreGenTriangleFreq (TXA& txa, float freq) void GEN::SetPreGenTriangleFreq (TXA& txa, float freq)
{ {
txa.gen0.p->tri.f = freq; txa.gen0.p->tri.f = freq;
calc_triangle (txa.gen0.p); txa.gen0.p->calc_triangle();
} }
void GEN::SetPreGenPulseMag (TXA& txa, float mag) void GEN::SetPreGenPulseMag (TXA& txa, float mag)
@ -515,25 +521,25 @@ void GEN::SetPreGenPulseMag (TXA& txa, float mag)
void GEN::SetPreGenPulseFreq (TXA& txa, float freq) void GEN::SetPreGenPulseFreq (TXA& txa, float freq)
{ {
txa.gen0.p->pulse.pf = freq; txa.gen0.p->pulse.pf = freq;
calc_pulse (txa.gen0.p); txa.gen0.p->calc_pulse();
} }
void GEN::SetPreGenPulseDutyCycle (TXA& txa, float dc) void GEN::SetPreGenPulseDutyCycle (TXA& txa, float dc)
{ {
txa.gen0.p->pulse.pdutycycle = dc; txa.gen0.p->pulse.pdutycycle = dc;
calc_pulse (txa.gen0.p); txa.gen0.p->calc_pulse();
} }
void GEN::SetPreGenPulseToneFreq (TXA& txa, float freq) void GEN::SetPreGenPulseToneFreq (TXA& txa, float freq)
{ {
txa.gen0.p->pulse.tf = freq; txa.gen0.p->pulse.tf = freq;
calc_pulse (txa.gen0.p); txa.gen0.p->calc_pulse();
} }
void GEN::SetPreGenPulseTransition (TXA& txa, float transtime) void GEN::SetPreGenPulseTransition (TXA& txa, float transtime)
{ {
txa.gen0.p->pulse.ptranstime = transtime; txa.gen0.p->pulse.ptranstime = transtime;
calc_pulse (txa.gen0.p); txa.gen0.p->calc_pulse();
} }
// 'PostGen', gen1 // 'PostGen', gen1
@ -556,7 +562,7 @@ void GEN::SetPostGenToneMag (TXA& txa, float mag)
void GEN::SetPostGenToneFreq (TXA& txa, float freq) void GEN::SetPostGenToneFreq (TXA& txa, float freq)
{ {
txa.gen1.p->tone.freq = freq; txa.gen1.p->tone.freq = freq;
calc_tone (txa.gen1.p); txa.gen1.p->calc_tone();
} }
void GEN::SetPostGenTTMag (TXA& txa, float mag1, float mag2) void GEN::SetPostGenTTMag (TXA& txa, float mag1, float mag2)
@ -569,7 +575,7 @@ void GEN::SetPostGenTTFreq (TXA& txa, float freq1, float freq2)
{ {
txa.gen1.p->tt.f1 = freq1; txa.gen1.p->tt.f1 = freq1;
txa.gen1.p->tt.f2 = freq2; txa.gen1.p->tt.f2 = freq2;
calc_tt (txa.gen1.p); txa.gen1.p->calc_tt();
} }
void GEN::SetPostGenSweepMag (TXA& txa, float mag) void GEN::SetPostGenSweepMag (TXA& txa, float mag)
@ -581,13 +587,13 @@ void GEN::SetPostGenSweepFreq (TXA& txa, float freq1, float freq2)
{ {
txa.gen1.p->sweep.f1 = freq1; txa.gen1.p->sweep.f1 = freq1;
txa.gen1.p->sweep.f2 = freq2; txa.gen1.p->sweep.f2 = freq2;
calc_sweep (txa.gen1.p); txa.gen1.p->calc_sweep();
} }
void GEN::SetPostGenSweepRate (TXA& txa, float rate) void GEN::SetPostGenSweepRate (TXA& txa, float rate)
{ {
txa.gen1.p->sweep.sweeprate = rate; txa.gen1.p->sweep.sweeprate = rate;
calc_sweep (txa.gen1.p); txa.gen1.p->calc_sweep();
} }
} // namespace WDSP } // namespace WDSP

View File

@ -32,7 +32,6 @@ warren@wpratt.com
namespace WDSP { namespace WDSP {
class RXA;
class TXA; class TXA;
class WDSP_API GEN class WDSP_API GEN
@ -121,22 +120,30 @@ public:
int state; int state;
} pulse; } pulse;
static GEN* create_gen (int run, int size, float* in, float* out, int rate, int mode); GEN(
static void destroy_gen (GEN *a); int run,
static void flush_gen (GEN *a); int size,
static void xgen (GEN *a); float* in,
static void setBuffers_gen (GEN *a, float* in, float* out); float* out,
static void setSamplerate_gen (GEN *a, int rate); int rate,
static void setSize_gen (GEN *a, int size); int mode
// RXA Properties );
static void SetPreGenRun (RXA& rxa, int run); ~GEN();
static void SetPreGenMode (RXA& rxa, int mode);
static void SetPreGenToneMag (RXA& rxa, float mag); void flush();
static void SetPreGenToneFreq (RXA& rxa, float freq); void execute();
static void SetPreGenNoiseMag (RXA& rxa, float mag); void setBuffers(float* in, float* out);
static void SetPreGenSweepMag (RXA& rxa, float mag); void setSamplerate(int rate);
static void SetPreGenSweepFreq (RXA& rxa, float freq1, float freq2); void setSize(int size);
static void SetPreGenSweepRate (RXA& rxa, float rate); // Public Properties
void SetPreRun(int run);
void SetPreMode(int mode);
void SetPreToneMag(float mag);
void SetPreToneFreq(float freq);
void SetPreNoiseMag(float mag);
void SetPreSweepMag(float mag);
void SetPreSweepFreq(float freq1, float freq2);
void SetPreSweepRate(float rate);
// TXA Properties // TXA Properties
static void SetPreGenRun (TXA& txa, int run); static void SetPreGenRun (TXA& txa, int run);
static void SetPreGenMode (TXA& txa, int mode); static void SetPreGenMode (TXA& txa, int mode);
@ -168,14 +175,14 @@ public:
static void SetPostGenSweepRate (TXA& txa, float rate); static void SetPostGenSweepRate (TXA& txa, float rate);
private: private:
static void calc_tone (GEN *a); void calc_tone();
static void calc_tt (GEN *a); void calc_tt();
static void calc_sweep (GEN *a); void calc_sweep();
static void calc_sawtooth (GEN *a); void calc_sawtooth();
static void calc_triangle (GEN *a); void calc_triangle();
static void calc_pulse (GEN *a); void calc_pulse();
static void calc_gen (GEN *a); void calc();
static void decalc_gen (GEN *a); void decalc();
}; };
} // namespace WDSP } // namespace WDSP

View File

@ -35,7 +35,6 @@ warren@wpratt.com
#define MAX_SAMPLERATE (1536000.0) #define MAX_SAMPLERATE (1536000.0)
#include "nob.hpp" #include "nob.hpp"
#include "RXA.hpp"
namespace WDSP { namespace WDSP {

View File

@ -32,8 +32,6 @@ warren@wpratt.com
namespace WDSP { namespace WDSP {
class RXA;
class WDSP_API NOB class WDSP_API NOB
{ {
public: public:

View File

@ -27,7 +27,6 @@ warren@wpratt.com
#include "comm.hpp" #include "comm.hpp"
#include "shift.hpp" #include "shift.hpp"
#include "RXA.hpp"
namespace WDSP { namespace WDSP {

View File

@ -32,8 +32,6 @@ warren@wpratt.com
namespace WDSP { namespace WDSP {
class RXA;
class WDSP_API SHIFT class WDSP_API SHIFT
{ {
public: public: