mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
WDSP: simplify RXA structs
This commit is contained in:
parent
78b73ae529
commit
994898d9fc
@ -45,9 +45,7 @@ class LDPCEncoder
|
|||||||
return b < TYPE(0) ? -a : b > TYPE(0) ? a : TYPE(0);
|
return b < TYPE(0) ? -a : b > TYPE(0) ? a : TYPE(0);
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
LDPCEncoder()
|
LDPCEncoder() = default
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void init(LDPCInterface *it)
|
void init(LDPCInterface *it)
|
||||||
{
|
{
|
||||||
|
534
wdsp/RXA.cpp
534
wdsp/RXA.cpp
@ -89,7 +89,7 @@ RXA* RXA::create_rxa (
|
|||||||
std::fill(rxa->meter, rxa->meter + RXA_METERTYPE_LAST, 0);
|
std::fill(rxa->meter, rxa->meter + RXA_METERTYPE_LAST, 0);
|
||||||
|
|
||||||
// Noise blanker (ANB or "NB")
|
// Noise blanker (ANB or "NB")
|
||||||
rxa->anb.p = ANB::create_anb(
|
rxa->anb = ANB::create_anb(
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_insize, // input buffer size
|
rxa->dsp_insize, // input buffer size
|
||||||
rxa->inbuff, // pointer to input buffer
|
rxa->inbuff, // pointer to input buffer
|
||||||
@ -102,7 +102,7 @@ RXA* RXA::create_rxa (
|
|||||||
30 // thershold
|
30 // thershold
|
||||||
);
|
);
|
||||||
// Noise blanker (NOB or "NB2")
|
// Noise blanker (NOB or "NB2")
|
||||||
rxa->nob.p = NOB::create_nob(
|
rxa->nob = NOB::create_nob(
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_insize, // input buffer size
|
rxa->dsp_insize, // input buffer size
|
||||||
rxa->inbuff, // pointer to input buffer
|
rxa->inbuff, // pointer to input buffer
|
||||||
@ -119,7 +119,7 @@ RXA* RXA::create_rxa (
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Ftequency shifter - shift to select a slice of spectrum
|
// Ftequency shifter - shift to select a slice of spectrum
|
||||||
rxa->shift.p = SHIFT::create_shift (
|
rxa->shift = SHIFT::create_shift (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_insize, // input buffer size
|
rxa->dsp_insize, // input buffer size
|
||||||
rxa->inbuff, // pointer to input buffer
|
rxa->inbuff, // pointer to input buffer
|
||||||
@ -128,7 +128,7 @@ RXA* RXA::create_rxa (
|
|||||||
0.0); // amount to shift (Hz)
|
0.0); // amount to shift (Hz)
|
||||||
|
|
||||||
// Input resampler - resample to dsp rate for main processing
|
// Input resampler - resample to dsp rate for main processing
|
||||||
rxa->rsmpin.p = RESAMPLE::create_resample (
|
rxa->rsmpin = RESAMPLE::create_resample (
|
||||||
0, // run - will be turned ON below if needed
|
0, // run - will be turned ON below if needed
|
||||||
rxa->dsp_insize, // input buffer size
|
rxa->dsp_insize, // input buffer size
|
||||||
rxa->inbuff, // pointer to input buffer
|
rxa->inbuff, // pointer to input buffer
|
||||||
@ -140,7 +140,7 @@ RXA* RXA::create_rxa (
|
|||||||
1.0); // gain
|
1.0); // gain
|
||||||
|
|
||||||
// Signal generator
|
// Signal generator
|
||||||
rxa->gen0.p = GEN::create_gen (
|
rxa->gen0 = GEN::create_gen (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // input buffer
|
rxa->midbuff, // input buffer
|
||||||
@ -149,7 +149,7 @@ RXA* RXA::create_rxa (
|
|||||||
2); // mode
|
2); // mode
|
||||||
|
|
||||||
// Input meter - ADC
|
// Input meter - ADC
|
||||||
rxa->adcmeter.p = METER::create_meter (
|
rxa->adcmeter = METER::create_meter (
|
||||||
0, // run
|
0, // run
|
||||||
0, // optional pointer to another 'run'
|
0, // optional pointer to another 'run'
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
@ -166,12 +166,12 @@ RXA* RXA::create_rxa (
|
|||||||
// Notched bandpass section
|
// Notched bandpass section
|
||||||
|
|
||||||
// notch database
|
// notch database
|
||||||
rxa->ndb.p = NOTCHDB::create_notchdb (
|
rxa->ndb = NOTCHDB::create_notchdb (
|
||||||
0, // master run for all nbp's
|
0, // master run for all nbp's
|
||||||
1024); // max number of notches
|
1024); // max number of notches
|
||||||
|
|
||||||
// notched bandpass
|
// notched bandpass
|
||||||
rxa->nbp0.p = NBP::create_nbp (
|
rxa->nbp0 = NBP::create_nbp (
|
||||||
1, // run, always runs
|
1, // run, always runs
|
||||||
0, // run the notches
|
0, // run the notches
|
||||||
0, // position
|
0, // position
|
||||||
@ -187,10 +187,10 @@ RXA* RXA::create_rxa (
|
|||||||
1.0, // gain
|
1.0, // gain
|
||||||
1, // auto-increase notch width
|
1, // auto-increase notch width
|
||||||
1025, // max number of passbands
|
1025, // max number of passbands
|
||||||
rxa->ndb.p); // addr of database pointer
|
rxa->ndb); // addr of database pointer
|
||||||
|
|
||||||
// bandpass for snba
|
// bandpass for snba
|
||||||
rxa->bpsnba.p = BPSNBA::create_bpsnba (
|
rxa->bpsnba = BPSNBA::create_bpsnba (
|
||||||
0, // bpsnba run flag
|
0, // bpsnba run flag
|
||||||
0, // run the notches
|
0, // run the notches
|
||||||
0, // position
|
0, // position
|
||||||
@ -208,10 +208,10 @@ RXA* RXA::create_rxa (
|
|||||||
1.0, // gain
|
1.0, // gain
|
||||||
1, // auto-increase notch width
|
1, // auto-increase notch width
|
||||||
1025, // max number of passbands
|
1025, // max number of passbands
|
||||||
rxa->ndb.p); // addr of database pointer
|
rxa->ndb); // addr of database pointer
|
||||||
|
|
||||||
// Post filter display send - send spectrum display (after S-meter in the block diagram)
|
// Post filter display send - send spectrum display (after S-meter in the block diagram)
|
||||||
rxa->sender.p = SENDER::create_sender (
|
rxa->sender = SENDER::create_sender (
|
||||||
0, // run
|
0, // run
|
||||||
0, // flag
|
0, // flag
|
||||||
0, // mode
|
0, // mode
|
||||||
@ -222,7 +222,7 @@ RXA* RXA::create_rxa (
|
|||||||
// End notched bandpass section
|
// End notched bandpass section
|
||||||
|
|
||||||
// S-meter
|
// S-meter
|
||||||
rxa->smeter.p = METER::create_meter (
|
rxa->smeter = METER::create_meter (
|
||||||
1, // run
|
1, // run
|
||||||
0, // optional pointer to another 'run'
|
0, // optional pointer to another 'run'
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
@ -237,7 +237,7 @@ RXA* RXA::create_rxa (
|
|||||||
0); // pointer for gain computation
|
0); // pointer for gain computation
|
||||||
|
|
||||||
// AM squelch capture (for other modes than FM)
|
// AM squelch capture (for other modes than FM)
|
||||||
rxa->amsq.p = AMSQ::create_amsq (
|
rxa->amsq = AMSQ::create_amsq (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // pointer to signal input buffer used by xamsq
|
rxa->midbuff, // pointer to signal input buffer used by xamsq
|
||||||
@ -254,7 +254,7 @@ RXA* RXA::create_rxa (
|
|||||||
0.0); // muted gain
|
0.0); // muted gain
|
||||||
|
|
||||||
// AM/SAM demodulator
|
// AM/SAM demodulator
|
||||||
rxa->amd.p = AMD::create_amd (
|
rxa->amd = AMD::create_amd (
|
||||||
0, // run - OFF by default
|
0, // run - OFF by default
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -271,7 +271,7 @@ RXA* RXA::create_rxa (
|
|||||||
1.4); // tauI
|
1.4); // tauI
|
||||||
|
|
||||||
// FM demodulator
|
// FM demodulator
|
||||||
rxa->fmd.p = FMD::create_fmd (
|
rxa->fmd = FMD::create_fmd (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -294,15 +294,15 @@ RXA* RXA::create_rxa (
|
|||||||
0); // min phase flag for audio cutoff filter
|
0); // min phase flag for audio cutoff filter
|
||||||
|
|
||||||
// FM squelch apply
|
// FM squelch apply
|
||||||
rxa->fmsq.p = FMSQ::create_fmsq (
|
rxa->fmsq = FMSQ::create_fmsq (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // pointer to input signal buffer
|
rxa->midbuff, // pointer to input signal buffer
|
||||||
rxa->midbuff, // pointer to output signal buffer
|
rxa->midbuff, // pointer to output signal buffer
|
||||||
rxa->fmd.p->audio, // pointer to trigger buffer
|
rxa->fmd->audio, // pointer to trigger buffer
|
||||||
rxa->dsp_rate, // sample rate
|
rxa->dsp_rate, // sample rate
|
||||||
5000.0, // cutoff freq for noise filter (Hz)
|
5000.0, // cutoff freq for noise filter (Hz)
|
||||||
&rxa->fmd.p->pllpole, // pointer to pole frequency of the fmd pll (Hz)
|
&rxa->fmd->pllpole, // pointer to pole frequency of the fmd pll (Hz)
|
||||||
0.100, // delay time after channel flush
|
0.100, // delay time after channel flush
|
||||||
0.001, // tau for noise averaging
|
0.001, // tau for noise averaging
|
||||||
0.100, // tau for long noise averaging
|
0.100, // tau for long noise averaging
|
||||||
@ -316,7 +316,7 @@ RXA* RXA::create_rxa (
|
|||||||
0); // minimum phase flag
|
0); // minimum phase flag
|
||||||
|
|
||||||
// Spectral noise blanker (SNB)
|
// Spectral noise blanker (SNB)
|
||||||
rxa->snba.p = SNBA::create_snba (
|
rxa->snba = SNBA::create_snba (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->midbuff, // input buffer
|
rxa->midbuff, // input buffer
|
||||||
rxa->midbuff, // output buffer
|
rxa->midbuff, // output buffer
|
||||||
@ -341,7 +341,7 @@ RXA* RXA::create_rxa (
|
|||||||
float default_F[11] = {0.0, 32.0, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0};
|
float default_F[11] = {0.0, 32.0, 63.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0};
|
||||||
//float default_G[11] = {0.0, -12.0, -12.0, -12.0, -1.0, +1.0, +4.0, +9.0, +12.0, -10.0, -10.0};
|
//float default_G[11] = {0.0, -12.0, -12.0, -12.0, -1.0, +1.0, +4.0, +9.0, +12.0, -10.0, -10.0};
|
||||||
float default_G[11] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
|
float default_G[11] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
|
||||||
rxa->eqp.p = EQP::create_eqp (
|
rxa->eqp = EQP::create_eqp (
|
||||||
0, // run - OFF by default
|
0, // run - OFF by default
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
std::max(2048, rxa->dsp_size), // number of filter coefficients
|
std::max(2048, rxa->dsp_size), // number of filter coefficients
|
||||||
@ -357,7 +357,7 @@ RXA* RXA::create_rxa (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Auto notch filter
|
// Auto notch filter
|
||||||
rxa->anf.p = ANF::create_anf (
|
rxa->anf = ANF::create_anf (
|
||||||
0, // run - OFF by default
|
0, // run - OFF by default
|
||||||
0, // position
|
0, // position
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
@ -377,7 +377,7 @@ RXA* RXA::create_rxa (
|
|||||||
3.0); // ldecr
|
3.0); // ldecr
|
||||||
|
|
||||||
// LMS noise reduction (ANR or "NR")
|
// LMS noise reduction (ANR or "NR")
|
||||||
rxa->anr.p = ANR::create_anr (
|
rxa->anr = ANR::create_anr (
|
||||||
0, // run - OFF by default
|
0, // run - OFF by default
|
||||||
0, // position
|
0, // position
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
@ -397,7 +397,7 @@ RXA* RXA::create_rxa (
|
|||||||
3.0); // ldecr
|
3.0); // ldecr
|
||||||
|
|
||||||
// Spectral noise reduyction (EMNR or "NR2")
|
// Spectral noise reduyction (EMNR or "NR2")
|
||||||
rxa->emnr.p = EMNR::create_emnr (
|
rxa->emnr = EMNR::create_emnr (
|
||||||
0, // run
|
0, // run
|
||||||
0, // position
|
0, // position
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
@ -413,7 +413,7 @@ RXA* RXA::create_rxa (
|
|||||||
1); // ae_run
|
1); // ae_run
|
||||||
|
|
||||||
// AGC
|
// AGC
|
||||||
rxa->agc.p = WCPAGC::create_wcpagc (
|
rxa->agc = WCPAGC::create_wcpagc (
|
||||||
1, // run
|
1, // run
|
||||||
3, // mode
|
3, // mode
|
||||||
1, // peakmode = envelope
|
1, // peakmode = envelope
|
||||||
@ -439,7 +439,7 @@ RXA* RXA::create_rxa (
|
|||||||
0.100); // tau_hang_decay
|
0.100); // tau_hang_decay
|
||||||
|
|
||||||
// AGC meter
|
// AGC meter
|
||||||
rxa->agcmeter.p = METER::create_meter (
|
rxa->agcmeter = METER::create_meter (
|
||||||
0, // run
|
0, // run
|
||||||
0, // optional pointer to another 'run'
|
0, // optional pointer to another 'run'
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
@ -451,10 +451,10 @@ RXA* RXA::create_rxa (
|
|||||||
RXA_AGC_AV, // index for average value
|
RXA_AGC_AV, // index for average value
|
||||||
RXA_AGC_PK, // index for peak value
|
RXA_AGC_PK, // index for peak value
|
||||||
RXA_AGC_GAIN, // index for gain value
|
RXA_AGC_GAIN, // index for gain value
|
||||||
&rxa->agc.p->gain); // pointer for gain computation
|
&rxa->agc->gain); // pointer for gain computation
|
||||||
|
|
||||||
// Bandpass filter - After spectral noise reduction in the block diagram
|
// Bandpass filter - After spectral noise reduction in the block diagram
|
||||||
rxa->bp1.p = BANDPASS::create_bandpass (
|
rxa->bp1 = BANDPASS::create_bandpass (
|
||||||
1, // run - used only with ( AM || ANF || ANR || EMNR)
|
1, // run - used only with ( AM || ANF || ANR || EMNR)
|
||||||
0, // position
|
0, // position
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
@ -469,7 +469,7 @@ RXA* RXA::create_rxa (
|
|||||||
1.0); // gain
|
1.0); // gain
|
||||||
|
|
||||||
// Scope/phase display send - pull phase & scope display data
|
// Scope/phase display send - pull phase & scope display data
|
||||||
rxa->sip1.p = SIPHON::create_siphon (
|
rxa->sip1 = SIPHON::create_siphon (
|
||||||
0, // run - needed only for phase display
|
0, // run - needed only for phase display
|
||||||
0, // position
|
0, // position
|
||||||
0, // mode
|
0, // mode
|
||||||
@ -481,7 +481,7 @@ RXA* RXA::create_rxa (
|
|||||||
0); // specmode
|
0); // specmode
|
||||||
|
|
||||||
// AM carrier block
|
// AM carrier block
|
||||||
rxa->cbl.p = CBL::create_cbl (
|
rxa->cbl = CBL::create_cbl (
|
||||||
0, // run - needed only if set to ON
|
0, // run - needed only if set to ON
|
||||||
rxa->dsp_size, // buffer size
|
rxa->dsp_size, // buffer size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -491,7 +491,7 @@ RXA* RXA::create_rxa (
|
|||||||
0.02); // tau
|
0.02); // tau
|
||||||
|
|
||||||
// CW peaking filter
|
// CW peaking filter
|
||||||
rxa->speak.p = SPEAK::create_speak (
|
rxa->speak = SPEAK::create_speak (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // buffer size,
|
rxa->dsp_size, // buffer size,
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -509,7 +509,7 @@ RXA* RXA::create_rxa (
|
|||||||
double def_freq[2] = {2125.0, 2295.0};
|
double def_freq[2] = {2125.0, 2295.0};
|
||||||
double def_bw[2] = {75.0, 75.0};
|
double def_bw[2] = {75.0, 75.0};
|
||||||
double def_gain[2] = {1.0, 1.0};
|
double def_gain[2] = {1.0, 1.0};
|
||||||
rxa->mpeak.p = MPEAK::create_mpeak (
|
rxa->mpeak = MPEAK::create_mpeak (
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -524,7 +524,7 @@ RXA* RXA::create_rxa (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Syllabic squelch (Voice suelch) - Not in the block diagram
|
// Syllabic squelch (Voice suelch) - Not in the block diagram
|
||||||
rxa->ssql.p = SSQL::create_ssql(
|
rxa->ssql = SSQL::create_ssql(
|
||||||
0, // run
|
0, // run
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -541,7 +541,7 @@ RXA* RXA::create_rxa (
|
|||||||
2000.0); // max freq for f_to_v converter
|
2000.0); // max freq for f_to_v converter
|
||||||
|
|
||||||
// PatchPanel
|
// PatchPanel
|
||||||
rxa->panel.p = PANEL::create_panel (
|
rxa->panel = PANEL::create_panel (
|
||||||
1, // run
|
1, // run
|
||||||
rxa->dsp_size, // size
|
rxa->dsp_size, // size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -555,7 +555,7 @@ RXA* RXA::create_rxa (
|
|||||||
// AM squelch apply - absent but in the block diagram
|
// AM squelch apply - absent but in the block diagram
|
||||||
|
|
||||||
// Output resampler
|
// Output resampler
|
||||||
rxa->rsmpout.p = RESAMPLE::create_resample (
|
rxa->rsmpout = RESAMPLE::create_resample (
|
||||||
0, // run - will be turned ON below if needed
|
0, // run - will be turned ON below if needed
|
||||||
rxa->dsp_size, // input buffer size
|
rxa->dsp_size, // input buffer size
|
||||||
rxa->midbuff, // pointer to input buffer
|
rxa->midbuff, // pointer to input buffer
|
||||||
@ -573,36 +573,36 @@ RXA* RXA::create_rxa (
|
|||||||
|
|
||||||
void RXA::destroy_rxa (RXA *rxa)
|
void RXA::destroy_rxa (RXA *rxa)
|
||||||
{
|
{
|
||||||
RESAMPLE::destroy_resample (rxa->rsmpout.p);
|
RESAMPLE::destroy_resample (rxa->rsmpout);
|
||||||
PANEL::destroy_panel (rxa->panel.p);
|
PANEL::destroy_panel (rxa->panel);
|
||||||
SSQL::destroy_ssql (rxa->ssql.p);
|
SSQL::destroy_ssql (rxa->ssql);
|
||||||
MPEAK::destroy_mpeak (rxa->mpeak.p);
|
MPEAK::destroy_mpeak (rxa->mpeak);
|
||||||
SPEAK::destroy_speak (rxa->speak.p);
|
SPEAK::destroy_speak (rxa->speak);
|
||||||
CBL::destroy_cbl (rxa->cbl.p);
|
CBL::destroy_cbl (rxa->cbl);
|
||||||
SIPHON::destroy_siphon (rxa->sip1.p);
|
SIPHON::destroy_siphon (rxa->sip1);
|
||||||
BANDPASS::destroy_bandpass (rxa->bp1.p);
|
BANDPASS::destroy_bandpass (rxa->bp1);
|
||||||
METER::destroy_meter (rxa->agcmeter.p);
|
METER::destroy_meter (rxa->agcmeter);
|
||||||
WCPAGC::destroy_wcpagc (rxa->agc.p);
|
WCPAGC::destroy_wcpagc (rxa->agc);
|
||||||
EMNR::destroy_emnr (rxa->emnr.p);
|
EMNR::destroy_emnr (rxa->emnr);
|
||||||
ANR::destroy_anr (rxa->anr.p);
|
ANR::destroy_anr (rxa->anr);
|
||||||
ANF::destroy_anf (rxa->anf.p);
|
ANF::destroy_anf (rxa->anf);
|
||||||
EQP::destroy_eqp (rxa->eqp.p);
|
EQP::destroy_eqp (rxa->eqp);
|
||||||
SNBA::destroy_snba (rxa->snba.p);
|
SNBA::destroy_snba (rxa->snba);
|
||||||
FMSQ::destroy_fmsq (rxa->fmsq.p);
|
FMSQ::destroy_fmsq (rxa->fmsq);
|
||||||
FMD::destroy_fmd (rxa->fmd.p);
|
FMD::destroy_fmd (rxa->fmd);
|
||||||
AMD::destroy_amd (rxa->amd.p);
|
AMD::destroy_amd (rxa->amd);
|
||||||
AMSQ::destroy_amsq (rxa->amsq.p);
|
AMSQ::destroy_amsq (rxa->amsq);
|
||||||
METER::destroy_meter (rxa->smeter.p);
|
METER::destroy_meter (rxa->smeter);
|
||||||
SENDER::destroy_sender (rxa->sender.p);
|
SENDER::destroy_sender (rxa->sender);
|
||||||
BPSNBA::destroy_bpsnba (rxa->bpsnba.p);
|
BPSNBA::destroy_bpsnba (rxa->bpsnba);
|
||||||
NBP::destroy_nbp (rxa->nbp0.p);
|
NBP::destroy_nbp (rxa->nbp0);
|
||||||
NOTCHDB::destroy_notchdb (rxa->ndb.p);
|
NOTCHDB::destroy_notchdb (rxa->ndb);
|
||||||
METER::destroy_meter (rxa->adcmeter.p);
|
METER::destroy_meter (rxa->adcmeter);
|
||||||
GEN::destroy_gen (rxa->gen0.p);
|
GEN::destroy_gen (rxa->gen0);
|
||||||
RESAMPLE::destroy_resample (rxa->rsmpin.p);
|
RESAMPLE::destroy_resample (rxa->rsmpin);
|
||||||
SHIFT::destroy_shift (rxa->shift.p);
|
SHIFT::destroy_shift (rxa->shift);
|
||||||
ANB::destroy_anb(rxa->anb.p);
|
NOB::destroy_nob(rxa->nob);
|
||||||
NOB::destroy_nob(rxa->nob.p);
|
ANB::destroy_anb(rxa->anb);
|
||||||
delete[] (rxa->midbuff);
|
delete[] (rxa->midbuff);
|
||||||
delete[] (rxa->outbuff);
|
delete[] (rxa->outbuff);
|
||||||
delete[] (rxa->inbuff);
|
delete[] (rxa->inbuff);
|
||||||
@ -614,76 +614,76 @@ void RXA::flush_rxa (RXA *rxa)
|
|||||||
std::fill(rxa->inbuff, rxa->inbuff + 1 * rxa->dsp_insize * 2, 0);
|
std::fill(rxa->inbuff, rxa->inbuff + 1 * rxa->dsp_insize * 2, 0);
|
||||||
std::fill(rxa->outbuff, rxa->outbuff + 1 * rxa->dsp_outsize * 2, 0);
|
std::fill(rxa->outbuff, rxa->outbuff + 1 * rxa->dsp_outsize * 2, 0);
|
||||||
std::fill(rxa->midbuff, rxa->midbuff + 2 * rxa->dsp_size * 2, 0);
|
std::fill(rxa->midbuff, rxa->midbuff + 2 * rxa->dsp_size * 2, 0);
|
||||||
SHIFT::flush_shift (rxa->shift.p);
|
ANB::flush_anb (rxa->anb);
|
||||||
RESAMPLE::flush_resample (rxa->rsmpin.p);
|
NOB::flush_nob(rxa->nob);
|
||||||
GEN::flush_gen (rxa->gen0.p);
|
SHIFT::flush_shift (rxa->shift);
|
||||||
METER::flush_meter (rxa->adcmeter.p);
|
RESAMPLE::flush_resample (rxa->rsmpin);
|
||||||
NBP::flush_nbp (rxa->nbp0.p);
|
GEN::flush_gen (rxa->gen0);
|
||||||
BPSNBA::flush_bpsnba (rxa->bpsnba.p);
|
METER::flush_meter (rxa->adcmeter);
|
||||||
SENDER::flush_sender (rxa->sender.p);
|
NBP::flush_nbp (rxa->nbp0);
|
||||||
METER::flush_meter (rxa->smeter.p);
|
BPSNBA::flush_bpsnba (rxa->bpsnba);
|
||||||
AMSQ::flush_amsq (rxa->amsq.p);
|
SENDER::flush_sender (rxa->sender);
|
||||||
AMD::flush_amd (rxa->amd.p);
|
METER::flush_meter (rxa->smeter);
|
||||||
FMD::flush_fmd (rxa->fmd.p);
|
AMSQ::flush_amsq (rxa->amsq);
|
||||||
FMSQ::flush_fmsq (rxa->fmsq.p);
|
AMD::flush_amd (rxa->amd);
|
||||||
SNBA::flush_snba (rxa->snba.p);
|
FMD::flush_fmd (rxa->fmd);
|
||||||
EQP::flush_eqp (rxa->eqp.p);
|
FMSQ::flush_fmsq (rxa->fmsq);
|
||||||
ANF::flush_anf (rxa->anf.p);
|
SNBA::flush_snba (rxa->snba);
|
||||||
ANR::flush_anr (rxa->anr.p);
|
EQP::flush_eqp (rxa->eqp);
|
||||||
EMNR::flush_emnr (rxa->emnr.p);
|
ANF::flush_anf (rxa->anf);
|
||||||
WCPAGC::flush_wcpagc (rxa->agc.p);
|
ANR::flush_anr (rxa->anr);
|
||||||
METER::flush_meter (rxa->agcmeter.p);
|
EMNR::flush_emnr (rxa->emnr);
|
||||||
BANDPASS::flush_bandpass (rxa->bp1.p);
|
WCPAGC::flush_wcpagc (rxa->agc);
|
||||||
SIPHON::flush_siphon (rxa->sip1.p);
|
METER::flush_meter (rxa->agcmeter);
|
||||||
CBL::flush_cbl (rxa->cbl.p);
|
BANDPASS::flush_bandpass (rxa->bp1);
|
||||||
SPEAK::flush_speak (rxa->speak.p);
|
SIPHON::flush_siphon (rxa->sip1);
|
||||||
MPEAK::flush_mpeak (rxa->mpeak.p);
|
CBL::flush_cbl (rxa->cbl);
|
||||||
SSQL::flush_ssql (rxa->ssql.p);
|
SPEAK::flush_speak (rxa->speak);
|
||||||
PANEL::flush_panel (rxa->panel.p);
|
MPEAK::flush_mpeak (rxa->mpeak);
|
||||||
RESAMPLE::flush_resample (rxa->rsmpout.p);
|
SSQL::flush_ssql (rxa->ssql);
|
||||||
ANB::flush_anb (rxa->anb.p);
|
PANEL::flush_panel (rxa->panel);
|
||||||
NOB::flush_nob(rxa->nob.p);
|
RESAMPLE::flush_resample (rxa->rsmpout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RXA::xrxa (RXA *rxa)
|
void RXA::xrxa (RXA *rxa)
|
||||||
{
|
{
|
||||||
ANB::xanb (rxa->anb.p);
|
ANB::xanb (rxa->anb);
|
||||||
NOB::xnob (rxa->nob.p);
|
NOB::xnob (rxa->nob);
|
||||||
SHIFT::xshift (rxa->shift.p);
|
SHIFT::xshift (rxa->shift);
|
||||||
RESAMPLE::xresample (rxa->rsmpin.p);
|
RESAMPLE::xresample (rxa->rsmpin);
|
||||||
GEN::xgen (rxa->gen0.p);
|
GEN::xgen (rxa->gen0);
|
||||||
METER::xmeter (rxa->adcmeter.p);
|
METER::xmeter (rxa->adcmeter);
|
||||||
BPSNBA::xbpsnbain (rxa->bpsnba.p, 0);
|
BPSNBA::xbpsnbain (rxa->bpsnba, 0);
|
||||||
NBP::xnbp (rxa->nbp0.p, 0);
|
NBP::xnbp (rxa->nbp0, 0);
|
||||||
METER::xmeter (rxa->smeter.p);
|
METER::xmeter (rxa->smeter);
|
||||||
SENDER::xsender (rxa->sender.p);
|
SENDER::xsender (rxa->sender);
|
||||||
AMSQ::xamsqcap (rxa->amsq.p);
|
AMSQ::xamsqcap (rxa->amsq);
|
||||||
BPSNBA::xbpsnbaout (rxa->bpsnba.p, 0);
|
BPSNBA::xbpsnbaout (rxa->bpsnba, 0);
|
||||||
AMD::xamd (rxa->amd.p);
|
AMD::xamd (rxa->amd);
|
||||||
FMD::xfmd (rxa->fmd.p);
|
FMD::xfmd (rxa->fmd);
|
||||||
FMSQ::xfmsq (rxa->fmsq.p);
|
FMSQ::xfmsq (rxa->fmsq);
|
||||||
BPSNBA::xbpsnbain (rxa->bpsnba.p, 1);
|
BPSNBA::xbpsnbain (rxa->bpsnba, 1);
|
||||||
BPSNBA::xbpsnbaout (rxa->bpsnba.p, 1);
|
BPSNBA::xbpsnbaout (rxa->bpsnba, 1);
|
||||||
SNBA::xsnba (rxa->snba.p);
|
SNBA::xsnba (rxa->snba);
|
||||||
EQP::xeqp (rxa->eqp.p);
|
EQP::xeqp (rxa->eqp);
|
||||||
ANF::xanf (rxa->anf.p, 0);
|
ANF::xanf (rxa->anf, 0);
|
||||||
ANR::xanr (rxa->anr.p, 0);
|
ANR::xanr (rxa->anr, 0);
|
||||||
EMNR::xemnr (rxa->emnr.p, 0);
|
EMNR::xemnr (rxa->emnr, 0);
|
||||||
BANDPASS::xbandpass (rxa->bp1.p, 0);
|
BANDPASS::xbandpass (rxa->bp1, 0);
|
||||||
WCPAGC::xwcpagc (rxa->agc.p);
|
WCPAGC::xwcpagc (rxa->agc);
|
||||||
ANF::xanf (rxa->anf.p, 1);
|
ANF::xanf (rxa->anf, 1);
|
||||||
ANR::xanr (rxa->anr.p, 1);
|
ANR::xanr (rxa->anr, 1);
|
||||||
EMNR::xemnr (rxa->emnr.p, 1);
|
EMNR::xemnr (rxa->emnr, 1);
|
||||||
BANDPASS::xbandpass (rxa->bp1.p, 1);
|
BANDPASS::xbandpass (rxa->bp1, 1);
|
||||||
METER::xmeter (rxa->agcmeter.p);
|
METER::xmeter (rxa->agcmeter);
|
||||||
SIPHON::xsiphon (rxa->sip1.p, 0);
|
SIPHON::xsiphon (rxa->sip1, 0);
|
||||||
CBL::xcbl (rxa->cbl.p);
|
CBL::xcbl (rxa->cbl);
|
||||||
SPEAK::xspeak (rxa->speak.p);
|
SPEAK::xspeak (rxa->speak);
|
||||||
MPEAK::xmpeak (rxa->mpeak.p);
|
MPEAK::xmpeak (rxa->mpeak);
|
||||||
SSQL::xssql (rxa->ssql.p);
|
SSQL::xssql (rxa->ssql);
|
||||||
PANEL::xpanel (rxa->panel.p);
|
PANEL::xpanel (rxa->panel);
|
||||||
AMSQ::xamsq (rxa->amsq.p);
|
AMSQ::xamsq (rxa->amsq);
|
||||||
RESAMPLE::xresample (rxa->rsmpout.p);
|
RESAMPLE::xresample (rxa->rsmpout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RXA::setInputSamplerate (RXA *rxa, int in_rate)
|
void RXA::setInputSamplerate (RXA *rxa, int in_rate)
|
||||||
@ -698,21 +698,21 @@ void RXA::setInputSamplerate (RXA *rxa, int in_rate)
|
|||||||
delete[] (rxa->inbuff);
|
delete[] (rxa->inbuff);
|
||||||
rxa->inbuff = new float[1 * rxa->dsp_insize * 2]; // (float *)malloc0(1 * ch.dsp_insize * sizeof(complex));
|
rxa->inbuff = new float[1 * rxa->dsp_insize * 2]; // (float *)malloc0(1 * ch.dsp_insize * sizeof(complex));
|
||||||
// anb
|
// anb
|
||||||
ANB::setBuffers_anb(rxa->anb.p, rxa->inbuff, rxa->inbuff);
|
ANB::setBuffers_anb(rxa->anb, rxa->inbuff, rxa->inbuff);
|
||||||
ANB::setSize_anb(rxa->anb.p, rxa->dsp_insize);
|
ANB::setSize_anb(rxa->anb, rxa->dsp_insize);
|
||||||
ANB::setSamplerate_anb(rxa->anb.p, rxa->in_rate);
|
ANB::setSamplerate_anb(rxa->anb, rxa->in_rate);
|
||||||
// nob
|
// nob
|
||||||
NOB::setBuffers_nob(rxa->nob.p, rxa->inbuff, rxa->inbuff);
|
NOB::setBuffers_nob(rxa->nob, rxa->inbuff, rxa->inbuff);
|
||||||
NOB::setSize_nob(rxa->nob.p, rxa->dsp_insize);
|
NOB::setSize_nob(rxa->nob, rxa->dsp_insize);
|
||||||
NOB::setSamplerate_nob(rxa->nob.p, rxa->in_rate);
|
NOB::setSamplerate_nob(rxa->nob, rxa->in_rate);
|
||||||
// shift
|
// shift
|
||||||
SHIFT::setBuffers_shift (rxa->shift.p, rxa->inbuff, rxa->inbuff);
|
SHIFT::setBuffers_shift (rxa->shift, rxa->inbuff, rxa->inbuff);
|
||||||
SHIFT::setSize_shift (rxa->shift.p, rxa->dsp_insize);
|
SHIFT::setSize_shift (rxa->shift, rxa->dsp_insize);
|
||||||
SHIFT::setSamplerate_shift (rxa->shift.p, rxa->in_rate);
|
SHIFT::setSamplerate_shift (rxa->shift, rxa->in_rate);
|
||||||
// input resampler
|
// input resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpin.p, rxa->inbuff, rxa->midbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpin, rxa->inbuff, rxa->midbuff);
|
||||||
RESAMPLE::setSize_resample (rxa->rsmpin.p, rxa->dsp_insize);
|
RESAMPLE::setSize_resample (rxa->rsmpin, rxa->dsp_insize);
|
||||||
RESAMPLE::setInRate_resample (rxa->rsmpin.p, rxa->in_rate);
|
RESAMPLE::setInRate_resample (rxa->rsmpin, rxa->in_rate);
|
||||||
ResCheck (*rxa);
|
ResCheck (*rxa);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,8 +728,8 @@ void RXA::setOutputSamplerate (RXA *rxa, int out_rate)
|
|||||||
delete[] (rxa->outbuff);
|
delete[] (rxa->outbuff);
|
||||||
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * ch.dsp_outsize * sizeof(complex));
|
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * ch.dsp_outsize * sizeof(complex));
|
||||||
// output resampler
|
// output resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpout.p, rxa->midbuff, rxa->outbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpout, rxa->midbuff, rxa->outbuff);
|
||||||
RESAMPLE::setOutRate_resample (rxa->rsmpout.p, rxa->out_rate);
|
RESAMPLE::setOutRate_resample (rxa->rsmpout, rxa->out_rate);
|
||||||
ResCheck (*rxa);
|
ResCheck (*rxa);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,47 +752,47 @@ void RXA::setDSPSamplerate (RXA *rxa, int dsp_rate)
|
|||||||
delete[] (rxa->outbuff);
|
delete[] (rxa->outbuff);
|
||||||
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * rxa->dsp_outsize * sizeof(complex));
|
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * rxa->dsp_outsize * sizeof(complex));
|
||||||
// anb
|
// anb
|
||||||
ANB::setBuffers_anb (rxa->anb.p, rxa->inbuff, rxa->inbuff);
|
ANB::setBuffers_anb (rxa->anb, rxa->inbuff, rxa->inbuff);
|
||||||
ANB::setSize_anb(rxa->anb.p, rxa->dsp_insize);
|
ANB::setSize_anb(rxa->anb, rxa->dsp_insize);
|
||||||
// nob
|
// nob
|
||||||
NOB::setBuffers_nob(rxa->nob.p, rxa->inbuff, rxa->inbuff);
|
NOB::setBuffers_nob(rxa->nob, rxa->inbuff, rxa->inbuff);
|
||||||
NOB::setSize_nob(rxa->nob.p, rxa->dsp_insize);
|
NOB::setSize_nob(rxa->nob, rxa->dsp_insize);
|
||||||
// shift
|
// shift
|
||||||
SHIFT::setBuffers_shift (rxa->shift.p, rxa->inbuff, rxa->inbuff);
|
SHIFT::setBuffers_shift (rxa->shift, rxa->inbuff, rxa->inbuff);
|
||||||
SHIFT::setSize_shift (rxa->shift.p, rxa->dsp_insize);
|
SHIFT::setSize_shift (rxa->shift, rxa->dsp_insize);
|
||||||
// input resampler
|
// input resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpin.p, rxa->inbuff, rxa->midbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpin, rxa->inbuff, rxa->midbuff);
|
||||||
RESAMPLE::setSize_resample (rxa->rsmpin.p, rxa->dsp_insize);
|
RESAMPLE::setSize_resample (rxa->rsmpin, rxa->dsp_insize);
|
||||||
RESAMPLE::setOutRate_resample (rxa->rsmpin.p, rxa->dsp_rate);
|
RESAMPLE::setOutRate_resample (rxa->rsmpin, rxa->dsp_rate);
|
||||||
// dsp_rate blocks
|
// dsp_rate blocks
|
||||||
GEN::setSamplerate_gen (rxa->gen0.p, rxa->dsp_rate);
|
GEN::setSamplerate_gen (rxa->gen0, rxa->dsp_rate);
|
||||||
METER::setSamplerate_meter (rxa->adcmeter.p, rxa->dsp_rate);
|
METER::setSamplerate_meter (rxa->adcmeter, rxa->dsp_rate);
|
||||||
NBP::setSamplerate_nbp (rxa->nbp0.p, rxa->dsp_rate);
|
NBP::setSamplerate_nbp (rxa->nbp0, rxa->dsp_rate);
|
||||||
BPSNBA::setSamplerate_bpsnba (rxa->bpsnba.p, rxa->dsp_rate);
|
BPSNBA::setSamplerate_bpsnba (rxa->bpsnba, rxa->dsp_rate);
|
||||||
METER::setSamplerate_meter (rxa->smeter.p, rxa->dsp_rate);
|
METER::setSamplerate_meter (rxa->smeter, rxa->dsp_rate);
|
||||||
SENDER::setSamplerate_sender (rxa->sender.p, rxa->dsp_rate);
|
SENDER::setSamplerate_sender (rxa->sender, rxa->dsp_rate);
|
||||||
AMSQ::setSamplerate_amsq (rxa->amsq.p, rxa->dsp_rate);
|
AMSQ::setSamplerate_amsq (rxa->amsq, rxa->dsp_rate);
|
||||||
AMD::setSamplerate_amd (rxa->amd.p, rxa->dsp_rate);
|
AMD::setSamplerate_amd (rxa->amd, rxa->dsp_rate);
|
||||||
FMD::setSamplerate_fmd (rxa->fmd.p, rxa->dsp_rate);
|
FMD::setSamplerate_fmd (rxa->fmd, rxa->dsp_rate);
|
||||||
FMSQ::setBuffers_fmsq (rxa->fmsq.p, rxa->midbuff, rxa->midbuff, rxa->fmd.p->audio);
|
FMSQ::setBuffers_fmsq (rxa->fmsq, rxa->midbuff, rxa->midbuff, rxa->fmd->audio);
|
||||||
FMSQ::setSamplerate_fmsq (rxa->fmsq.p, rxa->dsp_rate);
|
FMSQ::setSamplerate_fmsq (rxa->fmsq, rxa->dsp_rate);
|
||||||
SNBA::setSamplerate_snba (rxa->snba.p, rxa->dsp_rate);
|
SNBA::setSamplerate_snba (rxa->snba, rxa->dsp_rate);
|
||||||
EQP::setSamplerate_eqp (rxa->eqp.p, rxa->dsp_rate);
|
EQP::setSamplerate_eqp (rxa->eqp, rxa->dsp_rate);
|
||||||
ANF::setSamplerate_anf (rxa->anf.p, rxa->dsp_rate);
|
ANF::setSamplerate_anf (rxa->anf, rxa->dsp_rate);
|
||||||
ANR::setSamplerate_anr (rxa->anr.p, rxa->dsp_rate);
|
ANR::setSamplerate_anr (rxa->anr, rxa->dsp_rate);
|
||||||
EMNR::setSamplerate_emnr (rxa->emnr.p, rxa->dsp_rate);
|
EMNR::setSamplerate_emnr (rxa->emnr, rxa->dsp_rate);
|
||||||
BANDPASS::setSamplerate_bandpass (rxa->bp1.p, rxa->dsp_rate);
|
BANDPASS::setSamplerate_bandpass (rxa->bp1, rxa->dsp_rate);
|
||||||
WCPAGC::setSamplerate_wcpagc (rxa->agc.p, rxa->dsp_rate);
|
WCPAGC::setSamplerate_wcpagc (rxa->agc, rxa->dsp_rate);
|
||||||
METER::setSamplerate_meter (rxa->agcmeter.p, rxa->dsp_rate);
|
METER::setSamplerate_meter (rxa->agcmeter, rxa->dsp_rate);
|
||||||
SIPHON::setSamplerate_siphon (rxa->sip1.p, rxa->dsp_rate);
|
SIPHON::setSamplerate_siphon (rxa->sip1, rxa->dsp_rate);
|
||||||
CBL::setSamplerate_cbl (rxa->cbl.p, rxa->dsp_rate);
|
CBL::setSamplerate_cbl (rxa->cbl, rxa->dsp_rate);
|
||||||
SPEAK::setSamplerate_speak (rxa->speak.p, rxa->dsp_rate);
|
SPEAK::setSamplerate_speak (rxa->speak, rxa->dsp_rate);
|
||||||
MPEAK::setSamplerate_mpeak (rxa->mpeak.p, rxa->dsp_rate);
|
MPEAK::setSamplerate_mpeak (rxa->mpeak, rxa->dsp_rate);
|
||||||
SSQL::setSamplerate_ssql (rxa->ssql.p, rxa->dsp_rate);
|
SSQL::setSamplerate_ssql (rxa->ssql, rxa->dsp_rate);
|
||||||
PANEL::setSamplerate_panel (rxa->panel.p, rxa->dsp_rate);
|
PANEL::setSamplerate_panel (rxa->panel, rxa->dsp_rate);
|
||||||
// output resampler
|
// output resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpout.p, rxa->midbuff, rxa->outbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpout, rxa->midbuff, rxa->outbuff);
|
||||||
RESAMPLE::setInRate_resample (rxa->rsmpout.p, rxa->dsp_rate);
|
RESAMPLE::setInRate_resample (rxa->rsmpout, rxa->dsp_rate);
|
||||||
ResCheck (*rxa);
|
ResCheck (*rxa);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -817,75 +817,75 @@ void RXA::setDSPBuffsize (RXA *rxa, int dsp_size)
|
|||||||
delete[] (rxa->outbuff);
|
delete[] (rxa->outbuff);
|
||||||
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * rxa->dsp_outsize * sizeof(complex));
|
rxa->outbuff = new float[1 * rxa->dsp_outsize * 2]; // (float *)malloc0(1 * rxa->dsp_outsize * sizeof(complex));
|
||||||
// anb
|
// anb
|
||||||
ANB::setBuffers_anb (rxa->anb.p, rxa->inbuff, rxa->inbuff);
|
ANB::setBuffers_anb (rxa->anb, rxa->inbuff, rxa->inbuff);
|
||||||
ANB::setSize_anb (rxa->anb.p, rxa->dsp_insize);
|
ANB::setSize_anb (rxa->anb, rxa->dsp_insize);
|
||||||
// nob
|
// nob
|
||||||
NOB::setBuffers_nob(rxa->nob.p, rxa->inbuff, rxa->inbuff);
|
NOB::setBuffers_nob(rxa->nob, rxa->inbuff, rxa->inbuff);
|
||||||
NOB::setSize_nob(rxa->nob.p, rxa->dsp_insize);
|
NOB::setSize_nob(rxa->nob, rxa->dsp_insize);
|
||||||
// shift
|
// shift
|
||||||
SHIFT::setBuffers_shift (rxa->shift.p, rxa->inbuff, rxa->inbuff);
|
SHIFT::setBuffers_shift (rxa->shift, rxa->inbuff, rxa->inbuff);
|
||||||
SHIFT::setSize_shift (rxa->shift.p, rxa->dsp_insize);
|
SHIFT::setSize_shift (rxa->shift, rxa->dsp_insize);
|
||||||
// input resampler
|
// input resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpin.p, rxa->inbuff, rxa->midbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpin, rxa->inbuff, rxa->midbuff);
|
||||||
RESAMPLE::setSize_resample (rxa->rsmpin.p, rxa->dsp_insize);
|
RESAMPLE::setSize_resample (rxa->rsmpin, rxa->dsp_insize);
|
||||||
// dsp_size blocks
|
// dsp_size blocks
|
||||||
GEN::setBuffers_gen (rxa->gen0.p, rxa->midbuff, rxa->midbuff);
|
GEN::setBuffers_gen (rxa->gen0, rxa->midbuff, rxa->midbuff);
|
||||||
GEN::setSize_gen (rxa->gen0.p, rxa->dsp_size);
|
GEN::setSize_gen (rxa->gen0, rxa->dsp_size);
|
||||||
METER::setBuffers_meter (rxa->adcmeter.p, rxa->midbuff);
|
METER::setBuffers_meter (rxa->adcmeter, rxa->midbuff);
|
||||||
METER::setSize_meter (rxa->adcmeter.p, rxa->dsp_size);
|
METER::setSize_meter (rxa->adcmeter, rxa->dsp_size);
|
||||||
NBP::setBuffers_nbp (rxa->nbp0.p, rxa->midbuff, rxa->midbuff);
|
NBP::setBuffers_nbp (rxa->nbp0, rxa->midbuff, rxa->midbuff);
|
||||||
NBP::setSize_nbp (rxa->nbp0.p, rxa->dsp_size);
|
NBP::setSize_nbp (rxa->nbp0, rxa->dsp_size);
|
||||||
BPSNBA::setBuffers_bpsnba (rxa->bpsnba.p, rxa->midbuff, rxa->midbuff);
|
BPSNBA::setBuffers_bpsnba (rxa->bpsnba, rxa->midbuff, rxa->midbuff);
|
||||||
BPSNBA::setSize_bpsnba (rxa->bpsnba.p, rxa->dsp_size);
|
BPSNBA::setSize_bpsnba (rxa->bpsnba, rxa->dsp_size);
|
||||||
METER::setBuffers_meter (rxa->smeter.p, rxa->midbuff);
|
METER::setBuffers_meter (rxa->smeter, rxa->midbuff);
|
||||||
METER::setSize_meter (rxa->smeter.p, rxa->dsp_size);
|
METER::setSize_meter (rxa->smeter, rxa->dsp_size);
|
||||||
SENDER::setBuffers_sender (rxa->sender.p, rxa->midbuff);
|
SENDER::setBuffers_sender (rxa->sender, rxa->midbuff);
|
||||||
SENDER::setSize_sender (rxa->sender.p, rxa->dsp_size);
|
SENDER::setSize_sender (rxa->sender, rxa->dsp_size);
|
||||||
AMSQ::setBuffers_amsq (rxa->amsq.p, rxa->midbuff, rxa->midbuff, rxa->midbuff);
|
AMSQ::setBuffers_amsq (rxa->amsq, rxa->midbuff, rxa->midbuff, rxa->midbuff);
|
||||||
AMSQ::setSize_amsq (rxa->amsq.p, rxa->dsp_size);
|
AMSQ::setSize_amsq (rxa->amsq, rxa->dsp_size);
|
||||||
AMD::setBuffers_amd (rxa->amd.p, rxa->midbuff, rxa->midbuff);
|
AMD::setBuffers_amd (rxa->amd, rxa->midbuff, rxa->midbuff);
|
||||||
AMD::setSize_amd (rxa->amd.p, rxa->dsp_size);
|
AMD::setSize_amd (rxa->amd, rxa->dsp_size);
|
||||||
FMD::setBuffers_fmd (rxa->fmd.p, rxa->midbuff, rxa->midbuff);
|
FMD::setBuffers_fmd (rxa->fmd, rxa->midbuff, rxa->midbuff);
|
||||||
FMD::setSize_fmd (rxa->fmd.p, rxa->dsp_size);
|
FMD::setSize_fmd (rxa->fmd, rxa->dsp_size);
|
||||||
FMSQ::setBuffers_fmsq (rxa->fmsq.p, rxa->midbuff, rxa->midbuff, rxa->fmd.p->audio);
|
FMSQ::setBuffers_fmsq (rxa->fmsq, rxa->midbuff, rxa->midbuff, rxa->fmd->audio);
|
||||||
FMSQ::setSize_fmsq (rxa->fmsq.p, rxa->dsp_size);
|
FMSQ::setSize_fmsq (rxa->fmsq, rxa->dsp_size);
|
||||||
SNBA::setBuffers_snba (rxa->snba.p, rxa->midbuff, rxa->midbuff);
|
SNBA::setBuffers_snba (rxa->snba, rxa->midbuff, rxa->midbuff);
|
||||||
SNBA::setSize_snba (rxa->snba.p, rxa->dsp_size);
|
SNBA::setSize_snba (rxa->snba, rxa->dsp_size);
|
||||||
EQP::setBuffers_eqp (rxa->eqp.p, rxa->midbuff, rxa->midbuff);
|
EQP::setBuffers_eqp (rxa->eqp, rxa->midbuff, rxa->midbuff);
|
||||||
EQP::setSize_eqp (rxa->eqp.p, rxa->dsp_size);
|
EQP::setSize_eqp (rxa->eqp, rxa->dsp_size);
|
||||||
ANF::setBuffers_anf (rxa->anf.p, rxa->midbuff, rxa->midbuff);
|
ANF::setBuffers_anf (rxa->anf, rxa->midbuff, rxa->midbuff);
|
||||||
ANF::setSize_anf (rxa->anf.p, rxa->dsp_size);
|
ANF::setSize_anf (rxa->anf, rxa->dsp_size);
|
||||||
ANR::setBuffers_anr (rxa->anr.p, rxa->midbuff, rxa->midbuff);
|
ANR::setBuffers_anr (rxa->anr, rxa->midbuff, rxa->midbuff);
|
||||||
ANR::setSize_anr (rxa->anr.p, rxa->dsp_size);
|
ANR::setSize_anr (rxa->anr, rxa->dsp_size);
|
||||||
EMNR::setBuffers_emnr (rxa->emnr.p, rxa->midbuff, rxa->midbuff);
|
EMNR::setBuffers_emnr (rxa->emnr, rxa->midbuff, rxa->midbuff);
|
||||||
EMNR::setSize_emnr (rxa->emnr.p, rxa->dsp_size);
|
EMNR::setSize_emnr (rxa->emnr, rxa->dsp_size);
|
||||||
BANDPASS::setBuffers_bandpass (rxa->bp1.p, rxa->midbuff, rxa->midbuff);
|
BANDPASS::setBuffers_bandpass (rxa->bp1, rxa->midbuff, rxa->midbuff);
|
||||||
BANDPASS::setSize_bandpass (rxa->bp1.p, rxa->dsp_size);
|
BANDPASS::setSize_bandpass (rxa->bp1, rxa->dsp_size);
|
||||||
WCPAGC::setBuffers_wcpagc (rxa->agc.p, rxa->midbuff, rxa->midbuff);
|
WCPAGC::setBuffers_wcpagc (rxa->agc, rxa->midbuff, rxa->midbuff);
|
||||||
WCPAGC::setSize_wcpagc (rxa->agc.p, rxa->dsp_size);
|
WCPAGC::setSize_wcpagc (rxa->agc, rxa->dsp_size);
|
||||||
METER::setBuffers_meter (rxa->agcmeter.p, rxa->midbuff);
|
METER::setBuffers_meter (rxa->agcmeter, rxa->midbuff);
|
||||||
METER::setSize_meter (rxa->agcmeter.p, rxa->dsp_size);
|
METER::setSize_meter (rxa->agcmeter, rxa->dsp_size);
|
||||||
SIPHON::setBuffers_siphon (rxa->sip1.p, rxa->midbuff);
|
SIPHON::setBuffers_siphon (rxa->sip1, rxa->midbuff);
|
||||||
SIPHON::setSize_siphon (rxa->sip1.p, rxa->dsp_size);
|
SIPHON::setSize_siphon (rxa->sip1, rxa->dsp_size);
|
||||||
CBL::setBuffers_cbl (rxa->cbl.p, rxa->midbuff, rxa->midbuff);
|
CBL::setBuffers_cbl (rxa->cbl, rxa->midbuff, rxa->midbuff);
|
||||||
CBL::setSize_cbl (rxa->cbl.p, rxa->dsp_size);
|
CBL::setSize_cbl (rxa->cbl, rxa->dsp_size);
|
||||||
SPEAK::setBuffers_speak (rxa->speak.p, rxa->midbuff, rxa->midbuff);
|
SPEAK::setBuffers_speak (rxa->speak, rxa->midbuff, rxa->midbuff);
|
||||||
SPEAK::setSize_speak (rxa->speak.p, rxa->dsp_size);
|
SPEAK::setSize_speak (rxa->speak, rxa->dsp_size);
|
||||||
MPEAK::setBuffers_mpeak (rxa->mpeak.p, rxa->midbuff, rxa->midbuff);
|
MPEAK::setBuffers_mpeak (rxa->mpeak, rxa->midbuff, rxa->midbuff);
|
||||||
MPEAK::setSize_mpeak (rxa->mpeak.p, rxa->dsp_size);
|
MPEAK::setSize_mpeak (rxa->mpeak, rxa->dsp_size);
|
||||||
SSQL::setBuffers_ssql (rxa->ssql.p, rxa->midbuff, rxa->midbuff);
|
SSQL::setBuffers_ssql (rxa->ssql, rxa->midbuff, rxa->midbuff);
|
||||||
SSQL::setSize_ssql (rxa->ssql.p, rxa->dsp_size);
|
SSQL::setSize_ssql (rxa->ssql, rxa->dsp_size);
|
||||||
PANEL::setBuffers_panel (rxa->panel.p, rxa->midbuff, rxa->midbuff);
|
PANEL::setBuffers_panel (rxa->panel, rxa->midbuff, rxa->midbuff);
|
||||||
PANEL::setSize_panel (rxa->panel.p, rxa->dsp_size);
|
PANEL::setSize_panel (rxa->panel, rxa->dsp_size);
|
||||||
// output resampler
|
// output resampler
|
||||||
RESAMPLE::setBuffers_resample (rxa->rsmpout.p, rxa->midbuff, rxa->outbuff);
|
RESAMPLE::setBuffers_resample (rxa->rsmpout, rxa->midbuff, rxa->outbuff);
|
||||||
RESAMPLE::setSize_resample (rxa->rsmpout.p, rxa->dsp_size);
|
RESAMPLE::setSize_resample (rxa->rsmpout, rxa->dsp_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RXA::setSpectrumProbe(BufferProbe *spectrumProbe)
|
void RXA::setSpectrumProbe(BufferProbe *spectrumProbe)
|
||||||
{
|
{
|
||||||
SENDER::SetSpectrum(*this, 1, spectrumProbe);
|
SENDER::SetSpectrum(*this, 1, spectrumProbe);
|
||||||
sender.p->run = 1;
|
sender->run = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************************
|
/********************************************************************************************************
|
||||||
@ -899,33 +899,33 @@ void RXA::SetMode (RXA& rxa, int mode)
|
|||||||
if (rxa.mode != mode)
|
if (rxa.mode != mode)
|
||||||
{
|
{
|
||||||
int amd_run = (mode == RXA_AM) || (mode == RXA_SAM);
|
int amd_run = (mode == RXA_AM) || (mode == RXA_SAM);
|
||||||
bpsnbaCheck (rxa, mode, rxa.ndb.p->master_run);
|
bpsnbaCheck (rxa, mode, rxa.ndb->master_run);
|
||||||
bp1Check (
|
bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
amd_run,
|
amd_run,
|
||||||
rxa.snba.p->run,
|
rxa.snba->run,
|
||||||
rxa.emnr.p->run,
|
rxa.emnr->run,
|
||||||
rxa.anf.p->run,
|
rxa.anf->run,
|
||||||
rxa.anr.p->run
|
rxa.anr->run
|
||||||
);
|
);
|
||||||
rxa.mode = mode;
|
rxa.mode = mode;
|
||||||
rxa.amd.p->run = 0;
|
rxa.amd->run = 0;
|
||||||
rxa.fmd.p->run = 0;
|
rxa.fmd->run = 0;
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case RXA_AM:
|
case RXA_AM:
|
||||||
rxa.amd.p->run = 1;
|
rxa.amd->run = 1;
|
||||||
rxa.amd.p->mode = 0;
|
rxa.amd->mode = 0;
|
||||||
break;
|
break;
|
||||||
case RXA_SAM:
|
case RXA_SAM:
|
||||||
rxa.amd.p->run = 1;
|
rxa.amd->run = 1;
|
||||||
rxa.amd.p->mode = 1;
|
rxa.amd->mode = 1;
|
||||||
break;
|
break;
|
||||||
case RXA_DSB:
|
case RXA_DSB:
|
||||||
break;
|
break;
|
||||||
case RXA_FM:
|
case RXA_FM:
|
||||||
rxa.fmd.p->run = 1;
|
rxa.fmd->run = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
@ -940,12 +940,12 @@ void RXA::SetMode (RXA& rxa, int mode)
|
|||||||
void RXA::ResCheck (RXA& rxa)
|
void RXA::ResCheck (RXA& rxa)
|
||||||
{
|
{
|
||||||
// turn OFF/ON resamplers depending upon whether they're needed
|
// turn OFF/ON resamplers depending upon whether they're needed
|
||||||
RESAMPLE *a = rxa.rsmpin.p;
|
RESAMPLE *a = rxa.rsmpin;
|
||||||
if (rxa.in_rate != rxa.dsp_rate)
|
if (rxa.in_rate != rxa.dsp_rate)
|
||||||
a->run = 1;
|
a->run = 1;
|
||||||
else
|
else
|
||||||
a->run = 0;
|
a->run = 0;
|
||||||
a = rxa.rsmpout.p;
|
a = rxa.rsmpout;
|
||||||
if (rxa.dsp_rate != rxa.out_rate)
|
if (rxa.dsp_rate != rxa.out_rate)
|
||||||
a->run = 1;
|
a->run = 1;
|
||||||
else
|
else
|
||||||
@ -961,7 +961,7 @@ void RXA::bp1Check (
|
|||||||
int anr_run
|
int anr_run
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BANDPASS *a = rxa.bp1.p;
|
BANDPASS *a = rxa.bp1;
|
||||||
float gain;
|
float gain;
|
||||||
if (amd_run ||
|
if (amd_run ||
|
||||||
snba_run ||
|
snba_run ||
|
||||||
@ -978,13 +978,13 @@ void RXA::bp1Check (
|
|||||||
|
|
||||||
void RXA::bp1Set (RXA& rxa)
|
void RXA::bp1Set (RXA& rxa)
|
||||||
{
|
{
|
||||||
BANDPASS *a = rxa.bp1.p;
|
BANDPASS *a = rxa.bp1;
|
||||||
int old = a->run;
|
int old = a->run;
|
||||||
if ((rxa.amd.p->run == 1) ||
|
if ((rxa.amd->run == 1) ||
|
||||||
(rxa.snba.p->run == 1) ||
|
(rxa.snba->run == 1) ||
|
||||||
(rxa.emnr.p->run == 1) ||
|
(rxa.emnr->run == 1) ||
|
||||||
(rxa.anf.p->run == 1) ||
|
(rxa.anf->run == 1) ||
|
||||||
(rxa.anr.p->run == 1)
|
(rxa.anr->run == 1)
|
||||||
)
|
)
|
||||||
a->run = 1;
|
a->run = 1;
|
||||||
else
|
else
|
||||||
@ -998,7 +998,7 @@ void RXA::bpsnbaCheck (RXA& rxa, int mode, int notch_run)
|
|||||||
{
|
{
|
||||||
// for BPSNBA: set run, position, freqs, run_notches
|
// for BPSNBA: set run, position, freqs, run_notches
|
||||||
// call this upon change in RXA_mode, snba_run, notch_master_run
|
// call this upon change in RXA_mode, snba_run, notch_master_run
|
||||||
BPSNBA *a = rxa.bpsnba.p;
|
BPSNBA *a = rxa.bpsnba;
|
||||||
float f_low = 0.0, f_high = 0.0;
|
float f_low = 0.0, f_high = 0.0;
|
||||||
int run_notches = 0;
|
int run_notches = 0;
|
||||||
switch (mode)
|
switch (mode)
|
||||||
@ -1052,29 +1052,29 @@ void RXA::bpsnbaSet (RXA& rxa)
|
|||||||
{
|
{
|
||||||
// for BPSNBA: set run, position, freqs, run_notches
|
// for BPSNBA: set run, position, freqs, run_notches
|
||||||
// call this upon change in RXA_mode, snba_run, notch_master_run
|
// call this upon change in RXA_mode, snba_run, notch_master_run
|
||||||
BPSNBA *a = rxa.bpsnba.p;
|
BPSNBA *a = rxa.bpsnba;
|
||||||
switch (rxa.mode)
|
switch (rxa.mode)
|
||||||
{
|
{
|
||||||
case RXA_LSB:
|
case RXA_LSB:
|
||||||
case RXA_CWL:
|
case RXA_CWL:
|
||||||
case RXA_DIGL:
|
case RXA_DIGL:
|
||||||
a->run = rxa.snba.p->run;
|
a->run = rxa.snba->run;
|
||||||
a->position = 0;
|
a->position = 0;
|
||||||
break;
|
break;
|
||||||
case RXA_USB:
|
case RXA_USB:
|
||||||
case RXA_CWU:
|
case RXA_CWU:
|
||||||
case RXA_DIGU:
|
case RXA_DIGU:
|
||||||
a->run = rxa.snba.p->run;
|
a->run = rxa.snba->run;
|
||||||
a->position = 0;
|
a->position = 0;
|
||||||
break;
|
break;
|
||||||
case RXA_AM:
|
case RXA_AM:
|
||||||
case RXA_SAM:
|
case RXA_SAM:
|
||||||
case RXA_DSB:
|
case RXA_DSB:
|
||||||
a->run = rxa.snba.p->run;
|
a->run = rxa.snba->run;
|
||||||
a->position = 1;
|
a->position = 1;
|
||||||
break;
|
break;
|
||||||
case RXA_FM:
|
case RXA_FM:
|
||||||
a->run = rxa.snba.p->run;
|
a->run = rxa.snba->run;
|
||||||
a->position = 1;
|
a->position = 1;
|
||||||
break;
|
break;
|
||||||
case RXA_DRM:
|
case RXA_DRM:
|
||||||
|
143
wdsp/RXA.hpp
143
wdsp/RXA.hpp
@ -98,118 +98,37 @@ public:
|
|||||||
int mode;
|
int mode;
|
||||||
double meter[RXA_METERTYPE_LAST];
|
double meter[RXA_METERTYPE_LAST];
|
||||||
|
|
||||||
struct
|
ANB *anb;
|
||||||
{
|
NOB *nob;
|
||||||
METER *p;
|
SHIFT *shift;
|
||||||
} smeter, adcmeter, agcmeter;
|
RESAMPLE *rsmpin;
|
||||||
struct
|
GEN *gen0;
|
||||||
{
|
METER *adcmeter;
|
||||||
SHIFT *p;
|
NOTCHDB *ndb;
|
||||||
} shift;
|
NBP *nbp0;
|
||||||
struct
|
BPSNBA *bpsnba;
|
||||||
{
|
SENDER *sender;
|
||||||
RESAMPLE *p;
|
METER *smeter;
|
||||||
} rsmpin, rsmpout;
|
AMSQ *amsq;
|
||||||
struct
|
AMD *amd;
|
||||||
{
|
FMD *fmd;
|
||||||
GEN *p;
|
FMSQ *fmsq;
|
||||||
} gen0;
|
SNBA *snba;
|
||||||
struct
|
EQP *eqp;
|
||||||
{
|
ANF *anf;
|
||||||
BANDPASS *p;
|
ANR *anr;
|
||||||
} bp1;
|
EMNR *emnr;
|
||||||
struct
|
WCPAGC *agc;
|
||||||
{
|
METER *agcmeter;
|
||||||
BPS *p;
|
BANDPASS *bp1;
|
||||||
} bps1;
|
BPS *bps1;
|
||||||
struct
|
SIPHON *sip1;
|
||||||
{
|
CBL *cbl;
|
||||||
NOTCHDB *p;
|
SPEAK *speak;
|
||||||
} ndb;
|
MPEAK *mpeak;
|
||||||
struct
|
SSQL *ssql;
|
||||||
{
|
PANEL *panel;
|
||||||
NBP *p;
|
RESAMPLE *rsmpout;
|
||||||
} nbp0;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
BPSNBA *p;
|
|
||||||
} bpsnba;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
SNBA *p;
|
|
||||||
} snba;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
SENDER *p;
|
|
||||||
} sender;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
AMSQ *p;
|
|
||||||
} amsq;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
AMD *p;
|
|
||||||
} amd;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
FMD *p;
|
|
||||||
} fmd;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
FMSQ *p;
|
|
||||||
} fmsq;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
EQP *p;
|
|
||||||
} eqp;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
ANF *p;
|
|
||||||
} anf;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
ANR *p;
|
|
||||||
} anr;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
EMNR *p;
|
|
||||||
} emnr;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
WCPAGC *p;
|
|
||||||
} agc;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
SPEAK *p;
|
|
||||||
} speak;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
MPEAK *p;
|
|
||||||
} mpeak;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
PANEL *p;
|
|
||||||
} panel;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
SIPHON *p;
|
|
||||||
} sip1;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
CBL *p;
|
|
||||||
} cbl;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
SSQL *p;
|
|
||||||
} ssql;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
ANB *p;
|
|
||||||
} anb;
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
NOB *p;
|
|
||||||
} nob;
|
|
||||||
|
|
||||||
static RXA* create_rxa (
|
static RXA* create_rxa (
|
||||||
int in_rate, // input samplerate
|
int in_rate, // input samplerate
|
||||||
|
14
wdsp/amd.cpp
14
wdsp/amd.cpp
@ -296,17 +296,17 @@ void AMD::setSize_amd (AMD *a, int size)
|
|||||||
|
|
||||||
void AMD::SetAMDRun(RXA& rxa, int run)
|
void AMD::SetAMDRun(RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
AMD *a = rxa.amd.p;
|
AMD *a = rxa.amd;
|
||||||
|
|
||||||
if (a->run != run)
|
if (a->run != run)
|
||||||
{
|
{
|
||||||
RXA::bp1Check (
|
RXA::bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
run,
|
run,
|
||||||
rxa.snba.p->run,
|
rxa.snba->run,
|
||||||
rxa.emnr.p->run,
|
rxa.emnr->run,
|
||||||
rxa.anf.p->run,
|
rxa.anf->run,
|
||||||
rxa.anr.p->run
|
rxa.anr->run
|
||||||
);
|
);
|
||||||
|
|
||||||
a->run = run;
|
a->run = run;
|
||||||
@ -316,12 +316,12 @@ void AMD::SetAMDRun(RXA& rxa, int run)
|
|||||||
|
|
||||||
void AMD::SetAMDSBMode(RXA& rxa, int sbmode)
|
void AMD::SetAMDSBMode(RXA& rxa, int sbmode)
|
||||||
{
|
{
|
||||||
rxa.amd.p->sbmode = sbmode;
|
rxa.amd->sbmode = sbmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMD::SetAMDFadeLevel(RXA& rxa, int levelfade)
|
void AMD::SetAMDFadeLevel(RXA& rxa, int levelfade)
|
||||||
{
|
{
|
||||||
rxa.amd.p->levelfade = levelfade;
|
rxa.amd->levelfade = levelfade;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namesoace WDSP
|
} // namesoace WDSP
|
||||||
|
@ -255,20 +255,20 @@ void AMSQ::setSize_amsq (AMSQ *a, int size)
|
|||||||
|
|
||||||
void AMSQ::SetAMSQRun (RXA& rxa, int run)
|
void AMSQ::SetAMSQRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.amsq.p->run = run;
|
rxa.amsq->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMSQ::SetAMSQThreshold (RXA& rxa, double threshold)
|
void AMSQ::SetAMSQThreshold (RXA& rxa, double threshold)
|
||||||
{
|
{
|
||||||
double thresh = pow (10.0, threshold / 20.0);
|
double thresh = pow (10.0, threshold / 20.0);
|
||||||
rxa.amsq.p->tail_thresh = 0.9 * thresh;
|
rxa.amsq->tail_thresh = 0.9 * thresh;
|
||||||
rxa.amsq.p->unmute_thresh = thresh;
|
rxa.amsq->unmute_thresh = thresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMSQ::SetAMSQMaxTail (RXA& rxa, double tail)
|
void AMSQ::SetAMSQMaxTail (RXA& rxa, double tail)
|
||||||
{
|
{
|
||||||
AMSQ *a;
|
AMSQ *a;
|
||||||
a = rxa.amsq.p;
|
a = rxa.amsq;
|
||||||
|
|
||||||
if (tail < a->min_tail)
|
if (tail < a->min_tail)
|
||||||
tail = a->min_tail;
|
tail = a->min_tail;
|
||||||
|
16
wdsp/anb.cpp
16
wdsp/anb.cpp
@ -241,54 +241,54 @@ void ANB::setSize_anb (ANB *a, int size)
|
|||||||
|
|
||||||
void ANB::SetANBRun (RXA& rxa, int run)
|
void ANB::SetANBRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBBuffsize (RXA& rxa, int size)
|
void ANB::SetANBBuffsize (RXA& rxa, int size)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->buffsize = size;
|
a->buffsize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBSamplerate (RXA& rxa, int rate)
|
void ANB::SetANBSamplerate (RXA& rxa, int rate)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->samplerate = (double) rate;
|
a->samplerate = (double) rate;
|
||||||
initBlanker (a);
|
initBlanker (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBTau (RXA& rxa, double tau)
|
void ANB::SetANBTau (RXA& rxa, double tau)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->tau = tau;
|
a->tau = tau;
|
||||||
initBlanker (a);
|
initBlanker (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBHangtime (RXA& rxa, double time)
|
void ANB::SetANBHangtime (RXA& rxa, double time)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->hangtime = time;
|
a->hangtime = time;
|
||||||
initBlanker (a);
|
initBlanker (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBAdvtime (RXA& rxa, double time)
|
void ANB::SetANBAdvtime (RXA& rxa, double time)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->advtime = time;
|
a->advtime = time;
|
||||||
initBlanker (a);
|
initBlanker (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBBacktau (RXA& rxa, double tau)
|
void ANB::SetANBBacktau (RXA& rxa, double tau)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->backtau = tau;
|
a->backtau = tau;
|
||||||
initBlanker (a);
|
initBlanker (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANB::SetANBThreshold (RXA& rxa, double thresh)
|
void ANB::SetANBThreshold (RXA& rxa, double thresh)
|
||||||
{
|
{
|
||||||
ANB *a = rxa.anb.p;
|
ANB *a = rxa.anb;
|
||||||
a->threshold = thresh;
|
a->threshold = thresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
42
wdsp/anf.cpp
42
wdsp/anf.cpp
@ -184,17 +184,17 @@ void ANF::setSize_anf (ANF *a, int size)
|
|||||||
|
|
||||||
void ANF::SetANFRun (RXA& rxa, int run)
|
void ANF::SetANFRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
ANF *a = rxa.anf.p;
|
ANF *a = rxa.anf;
|
||||||
|
|
||||||
if (a->run != run)
|
if (a->run != run)
|
||||||
{
|
{
|
||||||
RXA::bp1Check (
|
RXA::bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
rxa.amd.p->run,
|
rxa.amd->run,
|
||||||
rxa.snba.p->run,
|
rxa.snba->run,
|
||||||
rxa.emnr.p->run,
|
rxa.emnr->run,
|
||||||
run,
|
run,
|
||||||
rxa.anr.p->run
|
rxa.anr->run
|
||||||
);
|
);
|
||||||
a->run = run;
|
a->run = run;
|
||||||
RXA::bp1Set (rxa);
|
RXA::bp1Set (rxa);
|
||||||
@ -205,42 +205,42 @@ void ANF::SetANFRun (RXA& rxa, int run)
|
|||||||
|
|
||||||
void ANF::SetANFVals (RXA& rxa, int taps, int delay, double gain, double leakage)
|
void ANF::SetANFVals (RXA& rxa, int taps, int delay, double gain, double leakage)
|
||||||
{
|
{
|
||||||
rxa.anf.p->n_taps = taps;
|
rxa.anf->n_taps = taps;
|
||||||
rxa.anf.p->delay = delay;
|
rxa.anf->delay = delay;
|
||||||
rxa.anf.p->two_mu = gain; //try two_mu = 1e-4
|
rxa.anf->two_mu = gain; //try two_mu = 1e-4
|
||||||
rxa.anf.p->gamma = leakage; //try gamma = 0.10
|
rxa.anf->gamma = leakage; //try gamma = 0.10
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANF::SetANFTaps (RXA& rxa, int taps)
|
void ANF::SetANFTaps (RXA& rxa, int taps)
|
||||||
{
|
{
|
||||||
rxa.anf.p->n_taps = taps;
|
rxa.anf->n_taps = taps;
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANF::SetANFDelay (RXA& rxa, int delay)
|
void ANF::SetANFDelay (RXA& rxa, int delay)
|
||||||
{
|
{
|
||||||
rxa.anf.p->delay = delay;
|
rxa.anf->delay = delay;
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANF::SetANFGain (RXA& rxa, double gain)
|
void ANF::SetANFGain (RXA& rxa, double gain)
|
||||||
{
|
{
|
||||||
rxa.anf.p->two_mu = gain;
|
rxa.anf->two_mu = gain;
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANF::SetANFLeakage (RXA& rxa, double leakage)
|
void ANF::SetANFLeakage (RXA& rxa, double leakage)
|
||||||
{
|
{
|
||||||
rxa.anf.p->gamma = leakage;
|
rxa.anf->gamma = leakage;
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANF::SetANFPosition (RXA& rxa, int position)
|
void ANF::SetANFPosition (RXA& rxa, int position)
|
||||||
{
|
{
|
||||||
rxa.anf.p->position = position;
|
rxa.anf->position = position;
|
||||||
rxa.bp1.p->position = position;
|
rxa.bp1->position = position;
|
||||||
flush_anf (rxa.anf.p);
|
flush_anf (rxa.anf);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WDSP
|
} // namespace WDSP
|
||||||
|
42
wdsp/anr.cpp
42
wdsp/anr.cpp
@ -184,16 +184,16 @@ void ANR::setSize_anr (ANR *a, int size)
|
|||||||
|
|
||||||
void ANR::SetANRRun (RXA& rxa, int run)
|
void ANR::SetANRRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
ANR *a = rxa.anr.p;
|
ANR *a = rxa.anr;
|
||||||
|
|
||||||
if (a->run != run)
|
if (a->run != run)
|
||||||
{
|
{
|
||||||
RXA::bp1Check (
|
RXA::bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
rxa.amd.p->run,
|
rxa.amd->run,
|
||||||
rxa.snba.p->run,
|
rxa.snba->run,
|
||||||
rxa.emnr.p->run,
|
rxa.emnr->run,
|
||||||
rxa.anf.p->run,
|
rxa.anf->run,
|
||||||
run
|
run
|
||||||
);
|
);
|
||||||
a->run = run;
|
a->run = run;
|
||||||
@ -204,42 +204,42 @@ void ANR::SetANRRun (RXA& rxa, int run)
|
|||||||
|
|
||||||
void ANR::SetANRVals (RXA& rxa, int taps, int delay, double gain, double leakage)
|
void ANR::SetANRVals (RXA& rxa, int taps, int delay, double gain, double leakage)
|
||||||
{
|
{
|
||||||
rxa.anr.p->n_taps = taps;
|
rxa.anr->n_taps = taps;
|
||||||
rxa.anr.p->delay = delay;
|
rxa.anr->delay = delay;
|
||||||
rxa.anr.p->two_mu = gain;
|
rxa.anr->two_mu = gain;
|
||||||
rxa.anr.p->gamma = leakage;
|
rxa.anr->gamma = leakage;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANR::SetANRTaps (RXA& rxa, int taps)
|
void ANR::SetANRTaps (RXA& rxa, int taps)
|
||||||
{
|
{
|
||||||
rxa.anr.p->n_taps = taps;
|
rxa.anr->n_taps = taps;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANR::SetANRDelay (RXA& rxa, int delay)
|
void ANR::SetANRDelay (RXA& rxa, int delay)
|
||||||
{
|
{
|
||||||
rxa.anr.p->delay = delay;
|
rxa.anr->delay = delay;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANR::SetANRGain (RXA& rxa, double gain)
|
void ANR::SetANRGain (RXA& rxa, double gain)
|
||||||
{
|
{
|
||||||
rxa.anr.p->two_mu = gain;
|
rxa.anr->two_mu = gain;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANR::SetANRLeakage (RXA& rxa, double leakage)
|
void ANR::SetANRLeakage (RXA& rxa, double leakage)
|
||||||
{
|
{
|
||||||
rxa.anr.p->gamma = leakage;
|
rxa.anr->gamma = leakage;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANR::SetANRPosition (RXA& rxa, int position)
|
void ANR::SetANRPosition (RXA& rxa, int position)
|
||||||
{
|
{
|
||||||
rxa.anr.p->position = position;
|
rxa.anr->position = position;
|
||||||
rxa.bp1.p->position = position;
|
rxa.bp1->position = position;
|
||||||
flush_anr (rxa.anr.p);
|
flush_anr (rxa.anr);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WDSP
|
} // namespace WDSP
|
||||||
|
@ -189,7 +189,7 @@ void BANDPASS::CalcBandpassFilter (BANDPASS *a, double f_low, double f_high, dou
|
|||||||
|
|
||||||
void BANDPASS::SetBandpassFreqs (RXA& rxa, double f_low, double f_high)
|
void BANDPASS::SetBandpassFreqs (RXA& rxa, double f_low, double f_high)
|
||||||
{
|
{
|
||||||
BANDPASS *a = rxa.bp1.p;
|
BANDPASS *a = rxa.bp1;
|
||||||
|
|
||||||
if ((f_low != a->f_low) || (f_high != a->f_high))
|
if ((f_low != a->f_low) || (f_high != a->f_high))
|
||||||
{
|
{
|
||||||
@ -215,7 +215,7 @@ void BANDPASS::SetBandpassNC (RXA& rxa, int nc)
|
|||||||
{
|
{
|
||||||
// NOTE: 'nc' must be >= 'size'
|
// NOTE: 'nc' must be >= 'size'
|
||||||
BANDPASS *a;
|
BANDPASS *a;
|
||||||
a = rxa.bp1.p;
|
a = rxa.bp1;
|
||||||
|
|
||||||
if (nc != a->nc)
|
if (nc != a->nc)
|
||||||
{
|
{
|
||||||
@ -237,7 +237,7 @@ void BANDPASS::SetBandpassNC (RXA& rxa, int nc)
|
|||||||
void BANDPASS::SetBandpassMP (RXA& rxa, int mp)
|
void BANDPASS::SetBandpassMP (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
BANDPASS *a;
|
BANDPASS *a;
|
||||||
a = rxa.bp1.p;
|
a = rxa.bp1;
|
||||||
|
|
||||||
if (mp != a->mp)
|
if (mp != a->mp)
|
||||||
{
|
{
|
||||||
|
20
wdsp/bps.cpp
20
wdsp/bps.cpp
@ -61,8 +61,18 @@ void BPS::decalc_bps (BPS *a)
|
|||||||
delete[] (a->infilt);
|
delete[] (a->infilt);
|
||||||
}
|
}
|
||||||
|
|
||||||
BPS* BPS::create_bps (int run, int position, int size, float* in, float* out,
|
BPS* BPS::create_bps (
|
||||||
float f_low, float f_high, int samplerate, int wintype, float gain)
|
int run,
|
||||||
|
int position,
|
||||||
|
int size,
|
||||||
|
float* in,
|
||||||
|
float* out,
|
||||||
|
float f_low,
|
||||||
|
float f_high,
|
||||||
|
int samplerate,
|
||||||
|
int wintype,
|
||||||
|
float gain
|
||||||
|
)
|
||||||
{
|
{
|
||||||
BPS *a = new BPS;
|
BPS *a = new BPS;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
@ -150,14 +160,14 @@ void BPS::setFreqs_bps (BPS *a, float f_low, float f_high)
|
|||||||
|
|
||||||
void BPS::SetBPSRun (RXA& rxa, int run)
|
void BPS::SetBPSRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.bp1.p->run = run;
|
rxa.bp1->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BPS::SetBPSFreqs (RXA& rxa, float f_low, float f_high)
|
void BPS::SetBPSFreqs (RXA& rxa, float f_low, float f_high)
|
||||||
{
|
{
|
||||||
float* impulse;
|
float* impulse;
|
||||||
BPS *a1;
|
BPS *a1;
|
||||||
a1 = rxa.bps1.p;
|
a1 = rxa.bps1;
|
||||||
|
|
||||||
if ((f_low != a1->f_low) || (f_high != a1->f_high))
|
if ((f_low != a1->f_low) || (f_high != a1->f_high))
|
||||||
{
|
{
|
||||||
@ -174,7 +184,7 @@ void BPS::SetBPSWindow (RXA& rxa, int wintype)
|
|||||||
{
|
{
|
||||||
float* impulse;
|
float* impulse;
|
||||||
BPS *a1;
|
BPS *a1;
|
||||||
a1 = rxa.bps1.p;
|
a1 = rxa.bps1;
|
||||||
|
|
||||||
if ((a1->wintype != wintype))
|
if ((a1->wintype != wintype))
|
||||||
{
|
{
|
||||||
|
14
wdsp/bps.hpp
14
wdsp/bps.hpp
@ -61,8 +61,18 @@ public:
|
|||||||
fftwf_plan CFor;
|
fftwf_plan CFor;
|
||||||
fftwf_plan CRev;
|
fftwf_plan CRev;
|
||||||
|
|
||||||
static BPS* create_bps (int run, int position, int size, float* in, float* out,
|
static BPS* create_bps (
|
||||||
float f_low, float f_high, int samplerate, int wintype, float gain);
|
int run,
|
||||||
|
int position,
|
||||||
|
int size,
|
||||||
|
float* in,
|
||||||
|
float* out,
|
||||||
|
float f_low,
|
||||||
|
float f_high,
|
||||||
|
int samplerate,
|
||||||
|
int wintype,
|
||||||
|
float gain
|
||||||
|
);
|
||||||
static void destroy_bps (BPS *a);
|
static void destroy_bps (BPS *a);
|
||||||
static void flush_bps (BPS *a);
|
static void flush_bps (BPS *a);
|
||||||
static void xbps (BPS *a, int pos);
|
static void xbps (BPS *a, int pos);
|
||||||
|
@ -193,7 +193,7 @@ void BPSNBA::recalc_bpsnba_filter (BPSNBA *a, int update)
|
|||||||
|
|
||||||
void BPSNBA::BPSNBASetNC (RXA& rxa, int nc)
|
void BPSNBA::BPSNBASetNC (RXA& rxa, int nc)
|
||||||
{
|
{
|
||||||
BPSNBA *a = rxa.bpsnba.p;
|
BPSNBA *a = rxa.bpsnba;
|
||||||
|
|
||||||
if (a->nc != nc)
|
if (a->nc != nc)
|
||||||
{
|
{
|
||||||
@ -205,7 +205,7 @@ void BPSNBA::BPSNBASetNC (RXA& rxa, int nc)
|
|||||||
|
|
||||||
void BPSNBA::BPSNBASetMP (RXA& rxa, int mp)
|
void BPSNBA::BPSNBASetMP (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
BPSNBA *a = rxa.bpsnba.p;
|
BPSNBA *a = rxa.bpsnba;
|
||||||
|
|
||||||
if (a->mp != mp)
|
if (a->mp != mp)
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ void CBL::setSize_cbl (CBL *a, int size)
|
|||||||
|
|
||||||
void CBL::SetCBLRun(RXA& rxa, int setit)
|
void CBL::SetCBLRun(RXA& rxa, int setit)
|
||||||
{
|
{
|
||||||
rxa.cbl.p->run = setit;
|
rxa.cbl->run = setit;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WDSP
|
} // namespace WDSP
|
||||||
|
@ -1077,17 +1077,17 @@ void EMNR::setSize_emnr (EMNR *a, int size)
|
|||||||
|
|
||||||
void EMNR::SetEMNRRun (RXA& rxa, int run)
|
void EMNR::SetEMNRRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
EMNR *a = rxa.emnr.p;
|
EMNR *a = rxa.emnr;
|
||||||
|
|
||||||
if (a->run != run)
|
if (a->run != run)
|
||||||
{
|
{
|
||||||
RXA::bp1Check (
|
RXA::bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
rxa.amd.p->run,
|
rxa.amd->run,
|
||||||
rxa.snba.p->run,
|
rxa.snba->run,
|
||||||
run,
|
run,
|
||||||
rxa.anf.p->run,
|
rxa.anf->run,
|
||||||
rxa.anr.p->run
|
rxa.anr->run
|
||||||
);
|
);
|
||||||
a->run = run;
|
a->run = run;
|
||||||
RXA::bp1Set (rxa);
|
RXA::bp1Set (rxa);
|
||||||
@ -1096,33 +1096,33 @@ void EMNR::SetEMNRRun (RXA& rxa, int run)
|
|||||||
|
|
||||||
void EMNR::SetEMNRgainMethod (RXA& rxa, int method)
|
void EMNR::SetEMNRgainMethod (RXA& rxa, int method)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->g.gain_method = method;
|
rxa.emnr->g.gain_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EMNR::SetEMNRnpeMethod (RXA& rxa, int method)
|
void EMNR::SetEMNRnpeMethod (RXA& rxa, int method)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->g.npe_method = method;
|
rxa.emnr->g.npe_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EMNR::SetEMNRaeRun (RXA& rxa, int run)
|
void EMNR::SetEMNRaeRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->g.ae_run = run;
|
rxa.emnr->g.ae_run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EMNR::SetEMNRPosition (RXA& rxa, int position)
|
void EMNR::SetEMNRPosition (RXA& rxa, int position)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->position = position;
|
rxa.emnr->position = position;
|
||||||
rxa.bp1.p->position = position;
|
rxa.bp1->position = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EMNR::SetEMNRaeZetaThresh (RXA& rxa, double zetathresh)
|
void EMNR::SetEMNRaeZetaThresh (RXA& rxa, double zetathresh)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->ae.zetaThresh = zetathresh;
|
rxa.emnr->ae.zetaThresh = zetathresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EMNR::SetEMNRaePsi (RXA& rxa, double psi)
|
void EMNR::SetEMNRaePsi (RXA& rxa, double psi)
|
||||||
{
|
{
|
||||||
rxa.emnr.p->ae.psi = psi;
|
rxa.emnr->ae.psi = psi;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WDSP
|
} // namespace WDSP
|
||||||
|
16
wdsp/eq.cpp
16
wdsp/eq.cpp
@ -289,14 +289,14 @@ void EQP::setSize_eqp (EQP *a, int size)
|
|||||||
|
|
||||||
void EQP::SetEQRun (RXA& rxa, int run)
|
void EQP::SetEQRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.eqp.p->run = run;
|
rxa.eqp->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQP::SetEQNC (RXA& rxa, int nc)
|
void EQP::SetEQNC (RXA& rxa, int nc)
|
||||||
{
|
{
|
||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
|
|
||||||
if (a->nc != nc)
|
if (a->nc != nc)
|
||||||
{
|
{
|
||||||
@ -310,7 +310,7 @@ void EQP::SetEQNC (RXA& rxa, int nc)
|
|||||||
void EQP::SetEQMP (RXA& rxa, int mp)
|
void EQP::SetEQMP (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
EQP *a;
|
EQP *a;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
if (a->mp != mp)
|
if (a->mp != mp)
|
||||||
{
|
{
|
||||||
a->mp = mp;
|
a->mp = mp;
|
||||||
@ -322,7 +322,7 @@ void EQP::SetEQProfile (RXA& rxa, int nfreqs, const float* F, const float* G)
|
|||||||
{
|
{
|
||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
delete[] (a->G);
|
delete[] (a->G);
|
||||||
delete[] (a->F);
|
delete[] (a->F);
|
||||||
a->nfreqs = nfreqs;
|
a->nfreqs = nfreqs;
|
||||||
@ -340,7 +340,7 @@ void EQP::SetEQCtfmode (RXA& rxa, int mode)
|
|||||||
{
|
{
|
||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
a->ctfmode = mode;
|
a->ctfmode = mode;
|
||||||
impulse = eq_impulse (a->nc, a->nfreqs, a->F, a->G, a->samplerate, 1.0 / (2.0 * a->size), a->ctfmode, a->wintype);
|
impulse = eq_impulse (a->nc, a->nfreqs, a->F, a->G, a->samplerate, 1.0 / (2.0 * a->size), a->ctfmode, a->wintype);
|
||||||
FIRCORE::setImpulse_fircore (a->p, impulse, 1);
|
FIRCORE::setImpulse_fircore (a->p, impulse, 1);
|
||||||
@ -351,7 +351,7 @@ void EQP::SetEQWintype (RXA& rxa, int wintype)
|
|||||||
{
|
{
|
||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
a->wintype = wintype;
|
a->wintype = wintype;
|
||||||
impulse = eq_impulse (a->nc, a->nfreqs, a->F, a->G, a->samplerate, 1.0 / (2.0 * a->size), a->ctfmode, a->wintype);
|
impulse = eq_impulse (a->nc, a->nfreqs, a->F, a->G, a->samplerate, 1.0 / (2.0 * a->size), a->ctfmode, a->wintype);
|
||||||
FIRCORE::setImpulse_fircore (a->p, impulse, 1);
|
FIRCORE::setImpulse_fircore (a->p, impulse, 1);
|
||||||
@ -362,7 +362,7 @@ void EQP::SetGrphEQ (RXA& rxa, int *rxeq)
|
|||||||
{ // three band equalizer (legacy compatibility)
|
{ // three band equalizer (legacy compatibility)
|
||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
delete[] (a->G);
|
delete[] (a->G);
|
||||||
delete[] (a->F);
|
delete[] (a->F);
|
||||||
a->nfreqs = 4;
|
a->nfreqs = 4;
|
||||||
@ -388,7 +388,7 @@ void EQP::SetGrphEQ10 (RXA& rxa, int *rxeq)
|
|||||||
EQP *a;
|
EQP *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
int i;
|
int i;
|
||||||
a = rxa.eqp.p;
|
a = rxa.eqp;
|
||||||
delete[] (a->G);
|
delete[] (a->G);
|
||||||
delete[] (a->F);
|
delete[] (a->F);
|
||||||
a->nfreqs = 10;
|
a->nfreqs = 10;
|
||||||
|
20
wdsp/fmd.cpp
20
wdsp/fmd.cpp
@ -275,7 +275,7 @@ void FMD::setSize_fmd (FMD *a, int size)
|
|||||||
void FMD::SetFMDeviation (RXA& rxa, double deviation)
|
void FMD::SetFMDeviation (RXA& rxa, double deviation)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
a->deviation = deviation;
|
a->deviation = deviation;
|
||||||
a->again = a->rate / (a->deviation * TWOPI);
|
a->again = a->rate / (a->deviation * TWOPI);
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ void FMD::SetFMDeviation (RXA& rxa, double deviation)
|
|||||||
void FMD::SetCTCSSFreq (RXA& rxa, double freq)
|
void FMD::SetCTCSSFreq (RXA& rxa, double freq)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
a->ctcss_freq = freq;
|
a->ctcss_freq = freq;
|
||||||
SNOTCH::SetSNCTCSSFreq (a->sntch, a->ctcss_freq);
|
SNOTCH::SetSNCTCSSFreq (a->sntch, a->ctcss_freq);
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ void FMD::SetCTCSSFreq (RXA& rxa, double freq)
|
|||||||
void FMD::SetCTCSSRun (RXA& rxa, int run)
|
void FMD::SetCTCSSRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
a->sntch_run = run;
|
a->sntch_run = run;
|
||||||
SNOTCH::SetSNCTCSSRun (a->sntch, a->sntch_run);
|
SNOTCH::SetSNCTCSSRun (a->sntch, a->sntch_run);
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ void FMD::SetFMNCde (RXA& rxa, int nc)
|
|||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
|
|
||||||
if (a->nc_de != nc)
|
if (a->nc_de != nc)
|
||||||
{
|
{
|
||||||
@ -314,7 +314,7 @@ void FMD::SetFMNCde (RXA& rxa, int nc)
|
|||||||
void FMD::SetFMMPde (RXA& rxa, int mp)
|
void FMD::SetFMMPde (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
if (a->mp_de != mp)
|
if (a->mp_de != mp)
|
||||||
{
|
{
|
||||||
a->mp_de = mp;
|
a->mp_de = mp;
|
||||||
@ -326,7 +326,7 @@ void FMD::SetFMNCaud (RXA& rxa, int nc)
|
|||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
|
|
||||||
if (a->nc_aud != nc)
|
if (a->nc_aud != nc)
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ void FMD::SetFMNCaud (RXA& rxa, int nc)
|
|||||||
void FMD::SetFMMPaud (RXA& rxa, int mp)
|
void FMD::SetFMMPaud (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
if (a->mp_aud != mp)
|
if (a->mp_aud != mp)
|
||||||
{
|
{
|
||||||
a->mp_aud = mp;
|
a->mp_aud = mp;
|
||||||
@ -351,7 +351,7 @@ void FMD::SetFMMPaud (RXA& rxa, int mp)
|
|||||||
void FMD::SetFMLimRun (RXA& rxa, int run)
|
void FMD::SetFMLimRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
FMD *a;
|
FMD *a;
|
||||||
a = rxa.fmd.p;
|
a = rxa.fmd;
|
||||||
|
|
||||||
if (a->lim_run != run) {
|
if (a->lim_run != run) {
|
||||||
a->lim_run = run;
|
a->lim_run = run;
|
||||||
@ -361,7 +361,7 @@ void FMD::SetFMLimRun (RXA& rxa, int run)
|
|||||||
void FMD::SetFMLimGain (RXA& rxa, double gaindB)
|
void FMD::SetFMLimGain (RXA& rxa, double gaindB)
|
||||||
{
|
{
|
||||||
double gain = pow(10.0, gaindB / 20.0);
|
double gain = pow(10.0, gaindB / 20.0);
|
||||||
FMD *a = rxa.fmd.p;
|
FMD *a = rxa.fmd;
|
||||||
|
|
||||||
if (a->lim_gain != gain)
|
if (a->lim_gain != gain)
|
||||||
{
|
{
|
||||||
@ -373,7 +373,7 @@ void FMD::SetFMLimGain (RXA& rxa, double gaindB)
|
|||||||
|
|
||||||
void FMD::SetFMAFFilter(RXA& rxa, double low, double high)
|
void FMD::SetFMAFFilter(RXA& rxa, double low, double high)
|
||||||
{
|
{
|
||||||
FMD *a = rxa.fmd.p;
|
FMD *a = rxa.fmd;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
|
|
||||||
if (a->f_low != low || a->f_high != high)
|
if (a->f_low != low || a->f_high != high)
|
||||||
|
@ -290,20 +290,20 @@ void FMSQ::setSize_fmsq (FMSQ *a, int size)
|
|||||||
|
|
||||||
void FMSQ::SetFMSQRun (RXA& rxa, int run)
|
void FMSQ::SetFMSQRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.fmsq.p->run = run;
|
rxa.fmsq->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FMSQ::SetFMSQThreshold (RXA& rxa, double threshold)
|
void FMSQ::SetFMSQThreshold (RXA& rxa, double threshold)
|
||||||
{
|
{
|
||||||
rxa.fmsq.p->tail_thresh = threshold;
|
rxa.fmsq->tail_thresh = threshold;
|
||||||
rxa.fmsq.p->unmute_thresh = 0.9 * threshold;
|
rxa.fmsq->unmute_thresh = 0.9 * threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FMSQ::SetFMSQNC (RXA& rxa, int nc)
|
void FMSQ::SetFMSQNC (RXA& rxa, int nc)
|
||||||
{
|
{
|
||||||
FMSQ *a;
|
FMSQ *a;
|
||||||
float* impulse;
|
float* impulse;
|
||||||
a = rxa.fmsq.p;
|
a = rxa.fmsq;
|
||||||
|
|
||||||
if (a->nc != nc)
|
if (a->nc != nc)
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ void FMSQ::SetFMSQNC (RXA& rxa, int nc)
|
|||||||
void FMSQ::SetFMSQMP (RXA& rxa, int mp)
|
void FMSQ::SetFMSQMP (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
FMSQ *a;
|
FMSQ *a;
|
||||||
a = rxa.fmsq.p;
|
a = rxa.fmsq;
|
||||||
|
|
||||||
if (a->mp != mp)
|
if (a->mp != mp)
|
||||||
{
|
{
|
||||||
|
24
wdsp/gen.cpp
24
wdsp/gen.cpp
@ -390,46 +390,46 @@ void GEN::setSize_gen (GEN *a, int size)
|
|||||||
|
|
||||||
void GEN::SetPreGenRun (RXA& rxa, int run)
|
void GEN::SetPreGenRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->run = run;
|
rxa.gen0->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenMode (RXA& rxa, int mode)
|
void GEN::SetPreGenMode (RXA& rxa, int mode)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->mode = mode;
|
rxa.gen0->mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenToneMag (RXA& rxa, float mag)
|
void GEN::SetPreGenToneMag (RXA& rxa, float mag)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->tone.mag = mag;
|
rxa.gen0->tone.mag = mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenToneFreq (RXA& rxa, float freq)
|
void GEN::SetPreGenToneFreq (RXA& rxa, float freq)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->tone.freq = freq;
|
rxa.gen0->tone.freq = freq;
|
||||||
calc_tone (rxa.gen0.p);
|
calc_tone (rxa.gen0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenNoiseMag (RXA& rxa, float mag)
|
void GEN::SetPreGenNoiseMag (RXA& rxa, float mag)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->noise.mag = mag;
|
rxa.gen0->noise.mag = mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenSweepMag (RXA& rxa, float mag)
|
void GEN::SetPreGenSweepMag (RXA& rxa, float mag)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->sweep.mag = mag;
|
rxa.gen0->sweep.mag = mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenSweepFreq (RXA& rxa, float freq1, float freq2)
|
void GEN::SetPreGenSweepFreq (RXA& rxa, float freq1, float freq2)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->sweep.f1 = freq1;
|
rxa.gen0->sweep.f1 = freq1;
|
||||||
rxa.gen0.p->sweep.f2 = freq2;
|
rxa.gen0->sweep.f2 = freq2;
|
||||||
calc_sweep (rxa.gen0.p);
|
calc_sweep (rxa.gen0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEN::SetPreGenSweepRate (RXA& rxa, float rate)
|
void GEN::SetPreGenSweepRate (RXA& rxa, float rate)
|
||||||
{
|
{
|
||||||
rxa.gen0.p->sweep.sweeprate = rate;
|
rxa.gen0->sweep.sweeprate = rate;
|
||||||
calc_sweep (rxa.gen0.p);
|
calc_sweep (rxa.gen0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
20
wdsp/iir.cpp
20
wdsp/iir.cpp
@ -334,27 +334,27 @@ void SPEAK::setSize_speak (SPEAK *a, int size)
|
|||||||
|
|
||||||
void SPEAK::SetSPCWRun (RXA& rxa, int run)
|
void SPEAK::SetSPCWRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
SPEAK *a = rxa.speak.p;
|
SPEAK *a = rxa.speak;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SPEAK::SetSPCWFreq (RXA& rxa, double freq)
|
void SPEAK::SetSPCWFreq (RXA& rxa, double freq)
|
||||||
{
|
{
|
||||||
SPEAK *a = rxa.speak.p;
|
SPEAK *a = rxa.speak;
|
||||||
a->f = freq;
|
a->f = freq;
|
||||||
calc_speak (a);
|
calc_speak (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SPEAK::SetSPCWBandwidth (RXA& rxa, double bw)
|
void SPEAK::SetSPCWBandwidth (RXA& rxa, double bw)
|
||||||
{
|
{
|
||||||
SPEAK *a = rxa.speak.p;
|
SPEAK *a = rxa.speak;
|
||||||
a->bw = bw;
|
a->bw = bw;
|
||||||
calc_speak (a);
|
calc_speak (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SPEAK::SetSPCWGain (RXA& rxa, double gain)
|
void SPEAK::SetSPCWGain (RXA& rxa, double gain)
|
||||||
{
|
{
|
||||||
SPEAK *a = rxa.speak.p;
|
SPEAK *a = rxa.speak;
|
||||||
a->gain = gain;
|
a->gain = gain;
|
||||||
calc_speak (a);
|
calc_speak (a);
|
||||||
}
|
}
|
||||||
@ -504,25 +504,25 @@ void MPEAK::setSize_mpeak (MPEAK *a, int size)
|
|||||||
|
|
||||||
void MPEAK::SetmpeakRun (RXA& rxa, int run)
|
void MPEAK::SetmpeakRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MPEAK::SetmpeakNpeaks (RXA& rxa, int npeaks)
|
void MPEAK::SetmpeakNpeaks (RXA& rxa, int npeaks)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->npeaks = npeaks;
|
a->npeaks = npeaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MPEAK::SetmpeakFilEnable (RXA& rxa, int fil, int enable)
|
void MPEAK::SetmpeakFilEnable (RXA& rxa, int fil, int enable)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->enable[fil] = enable;
|
a->enable[fil] = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MPEAK::SetmpeakFilFreq (RXA& rxa, int fil, double freq)
|
void MPEAK::SetmpeakFilFreq (RXA& rxa, int fil, double freq)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->f[fil] = freq;
|
a->f[fil] = freq;
|
||||||
a->pfil[fil]->f = freq;
|
a->pfil[fil]->f = freq;
|
||||||
SPEAK::calc_speak(a->pfil[fil]);
|
SPEAK::calc_speak(a->pfil[fil]);
|
||||||
@ -530,7 +530,7 @@ void MPEAK::SetmpeakFilFreq (RXA& rxa, int fil, double freq)
|
|||||||
|
|
||||||
void MPEAK::SetmpeakFilBw (RXA& rxa, int fil, double bw)
|
void MPEAK::SetmpeakFilBw (RXA& rxa, int fil, double bw)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->bw[fil] = bw;
|
a->bw[fil] = bw;
|
||||||
a->pfil[fil]->bw = bw;
|
a->pfil[fil]->bw = bw;
|
||||||
SPEAK::calc_speak(a->pfil[fil]);
|
SPEAK::calc_speak(a->pfil[fil]);
|
||||||
@ -538,7 +538,7 @@ void MPEAK::SetmpeakFilBw (RXA& rxa, int fil, double bw)
|
|||||||
|
|
||||||
void MPEAK::SetmpeakFilGain (RXA& rxa, int fil, double gain)
|
void MPEAK::SetmpeakFilGain (RXA& rxa, int fil, double gain)
|
||||||
{
|
{
|
||||||
MPEAK *a = rxa.mpeak.p;
|
MPEAK *a = rxa.mpeak;
|
||||||
a->gain[fil] = gain;
|
a->gain[fil] = gain;
|
||||||
a->pfil[fil]->gain = gain;
|
a->pfil[fil]->gain = gain;
|
||||||
SPEAK::calc_speak(a->pfil[fil]);
|
SPEAK::calc_speak(a->pfil[fil]);
|
||||||
|
44
wdsp/nbp.cpp
44
wdsp/nbp.cpp
@ -414,14 +414,14 @@ void NBP::setMp_nbp (NBP *a)
|
|||||||
|
|
||||||
void NBP::UpdateNBPFiltersLightWeight (RXA& rxa)
|
void NBP::UpdateNBPFiltersLightWeight (RXA& rxa)
|
||||||
{ // called when setting tune freq or shift freq
|
{ // called when setting tune freq or shift freq
|
||||||
calc_nbp_lightweight (rxa.nbp0.p);
|
calc_nbp_lightweight (rxa.nbp0);
|
||||||
calc_nbp_lightweight (rxa.bpsnba.p->bpsnba);
|
calc_nbp_lightweight (rxa.bpsnba->bpsnba);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NBP::UpdateNBPFilters(RXA& rxa)
|
void NBP::UpdateNBPFilters(RXA& rxa)
|
||||||
{
|
{
|
||||||
NBP *a = rxa.nbp0.p;
|
NBP *a = rxa.nbp0;
|
||||||
BPSNBA *b = rxa.bpsnba.p;
|
BPSNBA *b = rxa.bpsnba;
|
||||||
if (a->fnfrun)
|
if (a->fnfrun)
|
||||||
{
|
{
|
||||||
calc_nbp_impulse (a);
|
calc_nbp_impulse (a);
|
||||||
@ -439,7 +439,7 @@ int NBP::NBPAddNotch (RXA& rxa, int notch, double fcenter, double fwidth, int ac
|
|||||||
NOTCHDB *b;
|
NOTCHDB *b;
|
||||||
int i, j;
|
int i, j;
|
||||||
int rval;
|
int rval;
|
||||||
b = rxa.ndb.p;
|
b = rxa.ndb;
|
||||||
if (notch <= b->nn && b->nn < b->maxnotches)
|
if (notch <= b->nn && b->nn < b->maxnotches)
|
||||||
{
|
{
|
||||||
b->nn++;
|
b->nn++;
|
||||||
@ -468,7 +468,7 @@ int NBP::NBPGetNotch (RXA& rxa, int notch, double* fcenter, double* fwidth, int*
|
|||||||
{
|
{
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
int rval;
|
int rval;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
|
|
||||||
if (notch < a->nn)
|
if (notch < a->nn)
|
||||||
{
|
{
|
||||||
@ -493,7 +493,7 @@ int NBP::NBPDeleteNotch (RXA& rxa, int notch)
|
|||||||
int i, j;
|
int i, j;
|
||||||
int rval;
|
int rval;
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
if (notch < a->nn)
|
if (notch < a->nn)
|
||||||
{
|
{
|
||||||
a->nn--;
|
a->nn--;
|
||||||
@ -517,7 +517,7 @@ int NBP::NBPEditNotch (RXA& rxa, int notch, double fcenter, double fwidth, int a
|
|||||||
{
|
{
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
int rval;
|
int rval;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
if (notch < a->nn)
|
if (notch < a->nn)
|
||||||
{
|
{
|
||||||
a->fcenter[notch] = fcenter;
|
a->fcenter[notch] = fcenter;
|
||||||
@ -536,14 +536,14 @@ int NBP::NBPEditNotch (RXA& rxa, int notch, double fcenter, double fwidth, int a
|
|||||||
void NBP::NBPGetNumNotches (RXA& rxa, int* nnotches)
|
void NBP::NBPGetNumNotches (RXA& rxa, int* nnotches)
|
||||||
{
|
{
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
*nnotches = a->nn;
|
*nnotches = a->nn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NBP::NBPSetTuneFrequency (RXA& rxa, double tunefreq)
|
void NBP::NBPSetTuneFrequency (RXA& rxa, double tunefreq)
|
||||||
{
|
{
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
|
|
||||||
if (tunefreq != a->tunefreq)
|
if (tunefreq != a->tunefreq)
|
||||||
{
|
{
|
||||||
@ -555,7 +555,7 @@ void NBP::NBPSetTuneFrequency (RXA& rxa, double tunefreq)
|
|||||||
void NBP::NBPSetShiftFrequency (RXA& rxa, double shift)
|
void NBP::NBPSetShiftFrequency (RXA& rxa, double shift)
|
||||||
{
|
{
|
||||||
NOTCHDB *a;
|
NOTCHDB *a;
|
||||||
a = rxa.ndb.p;
|
a = rxa.ndb;
|
||||||
if (shift != a->shift)
|
if (shift != a->shift)
|
||||||
{
|
{
|
||||||
a->shift = shift;
|
a->shift = shift;
|
||||||
@ -565,8 +565,8 @@ void NBP::NBPSetShiftFrequency (RXA& rxa, double shift)
|
|||||||
|
|
||||||
void NBP::NBPSetNotchesRun (RXA& rxa, int run)
|
void NBP::NBPSetNotchesRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
NOTCHDB *a = rxa.ndb.p;
|
NOTCHDB *a = rxa.ndb;
|
||||||
NBP *b = rxa.nbp0.p;
|
NBP *b = rxa.nbp0;
|
||||||
|
|
||||||
if ( run != a->master_run)
|
if ( run != a->master_run)
|
||||||
{
|
{
|
||||||
@ -586,14 +586,14 @@ void NBP::NBPSetNotchesRun (RXA& rxa, int run)
|
|||||||
void NBP::NBPSetRun (RXA& rxa, int run)
|
void NBP::NBPSetRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NBP::NBPSetFreqs (RXA& rxa, double flow, double fhigh)
|
void NBP::NBPSetFreqs (RXA& rxa, double flow, double fhigh)
|
||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
|
|
||||||
if ((flow != a->flow) || (fhigh != a->fhigh))
|
if ((flow != a->flow) || (fhigh != a->fhigh))
|
||||||
{
|
{
|
||||||
@ -609,8 +609,8 @@ void NBP::NBPSetWindow (RXA& rxa, int wintype)
|
|||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
BPSNBA *b;
|
BPSNBA *b;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
b = rxa.bpsnba.p;
|
b = rxa.bpsnba;
|
||||||
|
|
||||||
if ((a->wintype != wintype))
|
if ((a->wintype != wintype))
|
||||||
{
|
{
|
||||||
@ -631,7 +631,7 @@ void NBP::NBPSetNC (RXA& rxa, int nc)
|
|||||||
{
|
{
|
||||||
// NOTE: 'nc' must be >= 'size'
|
// NOTE: 'nc' must be >= 'size'
|
||||||
NBP *a;
|
NBP *a;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
|
|
||||||
if (a->nc != nc)
|
if (a->nc != nc)
|
||||||
{
|
{
|
||||||
@ -643,7 +643,7 @@ void NBP::NBPSetNC (RXA& rxa, int nc)
|
|||||||
void NBP::NBPSetMP (RXA& rxa, int mp)
|
void NBP::NBPSetMP (RXA& rxa, int mp)
|
||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
|
|
||||||
if (a->mp != mp)
|
if (a->mp != mp)
|
||||||
{
|
{
|
||||||
@ -655,7 +655,7 @@ void NBP::NBPSetMP (RXA& rxa, int mp)
|
|||||||
void NBP::NBPGetMinNotchWidth (RXA& rxa, double* minwidth)
|
void NBP::NBPGetMinNotchWidth (RXA& rxa, double* minwidth)
|
||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
*minwidth = min_notch_width (a);
|
*minwidth = min_notch_width (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,8 +663,8 @@ void NBP::NBPSetAutoIncrease (RXA& rxa, int autoincr)
|
|||||||
{
|
{
|
||||||
NBP *a;
|
NBP *a;
|
||||||
BPSNBA *b;
|
BPSNBA *b;
|
||||||
a = rxa.nbp0.p;
|
a = rxa.nbp0;
|
||||||
b = rxa.bpsnba.p;
|
b = rxa.bpsnba;
|
||||||
|
|
||||||
if ((a->autoincr != autoincr))
|
if ((a->autoincr != autoincr))
|
||||||
{
|
{
|
||||||
|
18
wdsp/nob.cpp
18
wdsp/nob.cpp
@ -614,32 +614,32 @@ void NOB::setSize_nob (NOB *a, int size)
|
|||||||
|
|
||||||
void NOB::SetNOBRun (RXA& rxa, int run)
|
void NOB::SetNOBRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->run = run;
|
a->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBMode (RXA& rxa, int mode)
|
void NOB::SetNOBMode (RXA& rxa, int mode)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->mode = mode;
|
a->mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBBuffsize (RXA& rxa, int size)
|
void NOB::SetNOBBuffsize (RXA& rxa, int size)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->buffsize = size;
|
a->buffsize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBSamplerate (RXA& rxa, int rate)
|
void NOB::SetNOBSamplerate (RXA& rxa, int rate)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->samplerate = (double) rate;
|
a->samplerate = (double) rate;
|
||||||
init_nob (a);
|
init_nob (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBTau (RXA& rxa, double tau)
|
void NOB::SetNOBTau (RXA& rxa, double tau)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->advslewtime = tau;
|
a->advslewtime = tau;
|
||||||
a->hangslewtime = tau;
|
a->hangslewtime = tau;
|
||||||
init_nob (a);
|
init_nob (a);
|
||||||
@ -647,28 +647,28 @@ void NOB::SetNOBTau (RXA& rxa, double tau)
|
|||||||
|
|
||||||
void NOB::SetNOBHangtime (RXA& rxa, double time)
|
void NOB::SetNOBHangtime (RXA& rxa, double time)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->hangtime = time;
|
a->hangtime = time;
|
||||||
init_nob (a);
|
init_nob (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBAdvtime (RXA& rxa, double time)
|
void NOB::SetNOBAdvtime (RXA& rxa, double time)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->advtime = time;
|
a->advtime = time;
|
||||||
init_nob (a);
|
init_nob (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBBacktau (RXA& rxa, double tau)
|
void NOB::SetNOBBacktau (RXA& rxa, double tau)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->backtau = tau;
|
a->backtau = tau;
|
||||||
init_nob (a);
|
init_nob (a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NOB::SetNOBThreshold (RXA& rxa, double thresh)
|
void NOB::SetNOBThreshold (RXA& rxa, double thresh)
|
||||||
{
|
{
|
||||||
NOB *a = rxa.nob.p;
|
NOB *a = rxa.nob;
|
||||||
a->threshold = thresh;
|
a->threshold = thresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,23 +139,23 @@ void PANEL::setSize_panel (PANEL *a, int size)
|
|||||||
|
|
||||||
void PANEL::SetPanelRun (RXA& rxa, int run)
|
void PANEL::SetPanelRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.panel.p->run = run;
|
rxa.panel->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelSelect (RXA& rxa, int select)
|
void PANEL::SetPanelSelect (RXA& rxa, int select)
|
||||||
{
|
{
|
||||||
rxa.panel.p->inselect = select;
|
rxa.panel->inselect = select;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelGain1 (RXA& rxa, double gain)
|
void PANEL::SetPanelGain1 (RXA& rxa, double gain)
|
||||||
{
|
{
|
||||||
rxa.panel.p->gain1 = gain;
|
rxa.panel->gain1 = gain;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelGain2 (RXA& rxa, double gainI, double gainQ)
|
void PANEL::SetPanelGain2 (RXA& rxa, double gainI, double gainQ)
|
||||||
{
|
{
|
||||||
rxa.panel.p->gain2I = gainI;
|
rxa.panel->gain2I = gainI;
|
||||||
rxa.panel.p->gain2Q = gainQ;
|
rxa.panel->gain2Q = gainQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelPan (RXA& rxa, double pan)
|
void PANEL::SetPanelPan (RXA& rxa, double pan)
|
||||||
@ -173,18 +173,18 @@ void PANEL::SetPanelPan (RXA& rxa, double pan)
|
|||||||
gain2 = 1.0;
|
gain2 = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
rxa.panel.p->gain2I = gain1;
|
rxa.panel->gain2I = gain1;
|
||||||
rxa.panel.p->gain2Q = gain2;
|
rxa.panel->gain2Q = gain2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelCopy (RXA& rxa, int copy)
|
void PANEL::SetPanelCopy (RXA& rxa, int copy)
|
||||||
{
|
{
|
||||||
rxa.panel.p->copy = copy;
|
rxa.panel->copy = copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PANEL::SetPanelBinaural (RXA& rxa, int bin)
|
void PANEL::SetPanelBinaural (RXA& rxa, int bin)
|
||||||
{
|
{
|
||||||
rxa.panel.p->copy = 1 - bin;
|
rxa.panel->copy = 1 - bin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************************
|
/********************************************************************************************************
|
||||||
|
@ -94,7 +94,7 @@ void SENDER::setSize_sender (SENDER *a, int size)
|
|||||||
void SENDER::SetSpectrum (RXA& rxa, int flag, BufferProbe *spectrumProbe)
|
void SENDER::SetSpectrum (RXA& rxa, int flag, BufferProbe *spectrumProbe)
|
||||||
{
|
{
|
||||||
SENDER *a;
|
SENDER *a;
|
||||||
a = rxa.sender.p;
|
a = rxa.sender;
|
||||||
a->flag = flag;
|
a->flag = flag;
|
||||||
a->spectrumProbe = spectrumProbe;
|
a->spectrumProbe = spectrumProbe;
|
||||||
}
|
}
|
||||||
|
@ -123,13 +123,13 @@ void SHIFT::setSize_shift (SHIFT *a, int size)
|
|||||||
|
|
||||||
void SHIFT::SetShiftRun (RXA& rxa, int run)
|
void SHIFT::SetShiftRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.shift.p->run = run;
|
rxa.shift->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHIFT::SetShiftFreq (RXA& rxa, double fshift)
|
void SHIFT::SetShiftFreq (RXA& rxa, double fshift)
|
||||||
{
|
{
|
||||||
rxa.shift.p->shift = fshift;
|
rxa.shift->shift = fshift;
|
||||||
calc_shift (rxa.shift.p);
|
calc_shift (rxa.shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WDSP
|
} // namespace WDSP
|
||||||
|
@ -194,7 +194,7 @@ void SIPHON::sip_spectrum (SIPHON *a)
|
|||||||
|
|
||||||
void SIPHON::GetaSipF (RXA& rxa, float* out, int size)
|
void SIPHON::GetaSipF (RXA& rxa, float* out, int size)
|
||||||
{ // return raw samples as floats
|
{ // return raw samples as floats
|
||||||
SIPHON *a=rxa.sip1.p;
|
SIPHON *a=rxa.sip1;
|
||||||
int i;
|
int i;
|
||||||
a->outsize = size;
|
a->outsize = size;
|
||||||
suck (a);
|
suck (a);
|
||||||
@ -206,7 +206,7 @@ void SIPHON::GetaSipF (RXA& rxa, float* out, int size)
|
|||||||
|
|
||||||
void SIPHON::GetaSipF1 (RXA& rxa, float* out, int size)
|
void SIPHON::GetaSipF1 (RXA& rxa, float* out, int size)
|
||||||
{ // return raw samples as floats
|
{ // return raw samples as floats
|
||||||
SIPHON *a=rxa.sip1.p;
|
SIPHON *a=rxa.sip1;
|
||||||
int i;
|
int i;
|
||||||
a->outsize = size;
|
a->outsize = size;
|
||||||
suck (a);
|
suck (a);
|
||||||
|
@ -719,18 +719,18 @@ void SNBA::xsnba (SNBA *d)
|
|||||||
|
|
||||||
void SNBA::SetSNBARun (RXA& rxa, int run)
|
void SNBA::SetSNBARun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
SNBA *a = rxa.snba.p;
|
SNBA *a = rxa.snba;
|
||||||
|
|
||||||
if (a->run != run)
|
if (a->run != run)
|
||||||
{
|
{
|
||||||
RXA::bpsnbaCheck (rxa, rxa.mode, rxa.ndb.p->master_run);
|
RXA::bpsnbaCheck (rxa, rxa.mode, rxa.ndb->master_run);
|
||||||
RXA::bp1Check (
|
RXA::bp1Check (
|
||||||
rxa,
|
rxa,
|
||||||
rxa.amd.p->run,
|
rxa.amd->run,
|
||||||
run,
|
run,
|
||||||
rxa.emnr.p->run,
|
rxa.emnr->run,
|
||||||
rxa.anf.p->run,
|
rxa.anf->run,
|
||||||
rxa.anr.p->run
|
rxa.anr->run
|
||||||
);
|
);
|
||||||
a->run = run;
|
a->run = run;
|
||||||
RXA::bp1Set (rxa);
|
RXA::bp1Set (rxa);
|
||||||
@ -740,54 +740,54 @@ void SNBA::SetSNBARun (RXA& rxa, int run)
|
|||||||
|
|
||||||
void SNBA::SetSNBAovrlp (RXA& rxa, int ovrlp)
|
void SNBA::SetSNBAovrlp (RXA& rxa, int ovrlp)
|
||||||
{
|
{
|
||||||
decalc_snba (rxa.snba.p);
|
decalc_snba (rxa.snba);
|
||||||
rxa.snba.p->ovrlp = ovrlp;
|
rxa.snba->ovrlp = ovrlp;
|
||||||
calc_snba (rxa.snba.p);
|
calc_snba (rxa.snba);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAasize (RXA& rxa, int size)
|
void SNBA::SetSNBAasize (RXA& rxa, int size)
|
||||||
{
|
{
|
||||||
rxa.snba.p->exec.asize = size;
|
rxa.snba->exec.asize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAnpasses (RXA& rxa, int npasses)
|
void SNBA::SetSNBAnpasses (RXA& rxa, int npasses)
|
||||||
{
|
{
|
||||||
rxa.snba.p->exec.npasses = npasses;
|
rxa.snba->exec.npasses = npasses;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAk1 (RXA& rxa, double k1)
|
void SNBA::SetSNBAk1 (RXA& rxa, double k1)
|
||||||
{
|
{
|
||||||
rxa.snba.p->sdet.k1 = k1;
|
rxa.snba->sdet.k1 = k1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAk2 (RXA& rxa, double k2)
|
void SNBA::SetSNBAk2 (RXA& rxa, double k2)
|
||||||
{
|
{
|
||||||
rxa.snba.p->sdet.k2 = k2;
|
rxa.snba->sdet.k2 = k2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAbridge (RXA& rxa, int bridge)
|
void SNBA::SetSNBAbridge (RXA& rxa, int bridge)
|
||||||
{
|
{
|
||||||
rxa.snba.p->sdet.b = bridge;
|
rxa.snba->sdet.b = bridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBApresamps (RXA& rxa, int presamps)
|
void SNBA::SetSNBApresamps (RXA& rxa, int presamps)
|
||||||
{
|
{
|
||||||
rxa.snba.p->sdet.pre = presamps;
|
rxa.snba->sdet.pre = presamps;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBApostsamps (RXA& rxa, int postsamps)
|
void SNBA::SetSNBApostsamps (RXA& rxa, int postsamps)
|
||||||
{
|
{
|
||||||
rxa.snba.p->sdet.post = postsamps;
|
rxa.snba->sdet.post = postsamps;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBApmultmin (RXA& rxa, double pmultmin)
|
void SNBA::SetSNBApmultmin (RXA& rxa, double pmultmin)
|
||||||
{
|
{
|
||||||
rxa.snba.p->scan.pmultmin = pmultmin;
|
rxa.snba->scan.pmultmin = pmultmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SNBA::SetSNBAOutputBandwidth (RXA& rxa, double flow, double fhigh)
|
void SNBA::SetSNBAOutputBandwidth (RXA& rxa, double flow, double fhigh)
|
||||||
{
|
{
|
||||||
SNBA *a = rxa.snba.p;
|
SNBA *a = rxa.snba;
|
||||||
RESAMPLE *d = a->outresamp;
|
RESAMPLE *d = a->outresamp;
|
||||||
double f_low, f_high;
|
double f_low, f_high;
|
||||||
|
|
||||||
|
@ -350,21 +350,21 @@ void SSQL::setSize_ssql (SSQL *a, int size)
|
|||||||
|
|
||||||
void SSQL::SetSSQLRun (RXA& rxa, int run)
|
void SSQL::SetSSQLRun (RXA& rxa, int run)
|
||||||
{
|
{
|
||||||
rxa.ssql.p->run = run;
|
rxa.ssql->run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSQL::SetSSQLThreshold (RXA& rxa, double threshold)
|
void SSQL::SetSSQLThreshold (RXA& rxa, double threshold)
|
||||||
{
|
{
|
||||||
// 'threshold' should be between 0.0 and 1.0
|
// 'threshold' should be between 0.0 and 1.0
|
||||||
// WU2O testing: 0.16 is a good default for 'threshold'; => 0.08 for 'wthresh'
|
// WU2O testing: 0.16 is a good default for 'threshold'; => 0.08 for 'wthresh'
|
||||||
rxa.ssql.p->wthresh = threshold / 2.0;
|
rxa.ssql->wthresh = threshold / 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSQL::SetSSQLTauMute (RXA& rxa, double tau_mute)
|
void SSQL::SetSSQLTauMute (RXA& rxa, double tau_mute)
|
||||||
{
|
{
|
||||||
// reasonable (wide) range is 0.1 to 2.0
|
// reasonable (wide) range is 0.1 to 2.0
|
||||||
// WU2O testing: 0.1 is good default value
|
// WU2O testing: 0.1 is good default value
|
||||||
SSQL *a = rxa.ssql.p;
|
SSQL *a = rxa.ssql;
|
||||||
a->tr_tau_mute = tau_mute;
|
a->tr_tau_mute = tau_mute;
|
||||||
a->mute_mult = 1.0 - exp (-1.0 / (a->rate * a->tr_tau_mute));
|
a->mute_mult = 1.0 - exp (-1.0 / (a->rate * a->tr_tau_mute));
|
||||||
}
|
}
|
||||||
@ -373,7 +373,7 @@ void SSQL::SetSSQLTauUnMute (RXA& rxa, double tau_unmute)
|
|||||||
{
|
{
|
||||||
// reasonable (wide) range is 0.1 to 1.0
|
// reasonable (wide) range is 0.1 to 1.0
|
||||||
// WU2O testing: 0.1 is good default value
|
// WU2O testing: 0.1 is good default value
|
||||||
SSQL *a = rxa.ssql.p;
|
SSQL *a = rxa.ssql;
|
||||||
a->tr_tau_unmute = tau_unmute;
|
a->tr_tau_unmute = tau_unmute;
|
||||||
a->unmute_mult = 1.0 - exp (-1.0 / (a->rate * a->tr_tau_unmute));
|
a->unmute_mult = 1.0 - exp (-1.0 / (a->rate * a->tr_tau_unmute));
|
||||||
}
|
}
|
||||||
|
100
wdsp/wcpAGC.cpp
100
wdsp/wcpAGC.cpp
@ -390,63 +390,63 @@ void WCPAGC::SetAGCMode (RXA& rxa, int mode)
|
|||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case 0: //agcOFF
|
case 0: //agcOFF
|
||||||
rxa.agc.p->mode = 0;
|
rxa.agc->mode = 0;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
break;
|
break;
|
||||||
case 1: //agcLONG
|
case 1: //agcLONG
|
||||||
rxa.agc.p->mode = 1;
|
rxa.agc->mode = 1;
|
||||||
rxa.agc.p->hangtime = 2.000;
|
rxa.agc->hangtime = 2.000;
|
||||||
rxa.agc.p->tau_decay = 2.000;
|
rxa.agc->tau_decay = 2.000;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
break;
|
break;
|
||||||
case 2: //agcSLOW
|
case 2: //agcSLOW
|
||||||
rxa.agc.p->mode = 2;
|
rxa.agc->mode = 2;
|
||||||
rxa.agc.p->hangtime = 1.000;
|
rxa.agc->hangtime = 1.000;
|
||||||
rxa.agc.p->tau_decay = 0.500;
|
rxa.agc->tau_decay = 0.500;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
break;
|
break;
|
||||||
case 3: //agcMED
|
case 3: //agcMED
|
||||||
rxa.agc.p->mode = 3;
|
rxa.agc->mode = 3;
|
||||||
rxa.agc.p->hang_thresh = 1.0;
|
rxa.agc->hang_thresh = 1.0;
|
||||||
rxa.agc.p->hangtime = 0.000;
|
rxa.agc->hangtime = 0.000;
|
||||||
rxa.agc.p->tau_decay = 0.250;
|
rxa.agc->tau_decay = 0.250;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
break;
|
break;
|
||||||
case 4: //agcFAST
|
case 4: //agcFAST
|
||||||
rxa.agc.p->mode = 4;
|
rxa.agc->mode = 4;
|
||||||
rxa.agc.p->hang_thresh = 1.0;
|
rxa.agc->hang_thresh = 1.0;
|
||||||
rxa.agc.p->hangtime = 0.000;
|
rxa.agc->hangtime = 0.000;
|
||||||
rxa.agc.p->tau_decay = 0.050;
|
rxa.agc->tau_decay = 0.050;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rxa.agc.p->mode = 5;
|
rxa.agc->mode = 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCAttack (RXA& rxa, int attack)
|
void WCPAGC::SetAGCAttack (RXA& rxa, int attack)
|
||||||
{
|
{
|
||||||
rxa.agc.p->tau_attack = (float)attack / 1000.0;
|
rxa.agc->tau_attack = (float)attack / 1000.0;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCDecay (RXA& rxa, int decay)
|
void WCPAGC::SetAGCDecay (RXA& rxa, int decay)
|
||||||
{
|
{
|
||||||
rxa.agc.p->tau_decay = (float)decay / 1000.0;
|
rxa.agc->tau_decay = (float)decay / 1000.0;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCHang (RXA& rxa, int hang)
|
void WCPAGC::SetAGCHang (RXA& rxa, int hang)
|
||||||
{
|
{
|
||||||
rxa.agc.p->hangtime = (float)hang / 1000.0;
|
rxa.agc->hangtime = (float)hang / 1000.0;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::GetAGCHangLevel(RXA& rxa, double *hangLevel)
|
void WCPAGC::GetAGCHangLevel(RXA& rxa, double *hangLevel)
|
||||||
//for line on bandscope
|
//for line on bandscope
|
||||||
{
|
{
|
||||||
*hangLevel = 20.0 * log10( rxa.agc.p->hang_level / 0.637 );
|
*hangLevel = 20.0 * log10( rxa.agc->hang_level / 0.637 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCHangLevel(RXA& rxa, double hangLevel)
|
void WCPAGC::SetAGCHangLevel(RXA& rxa, double hangLevel)
|
||||||
@ -454,77 +454,77 @@ void WCPAGC::SetAGCHangLevel(RXA& rxa, double hangLevel)
|
|||||||
{
|
{
|
||||||
double convert, tmp;
|
double convert, tmp;
|
||||||
|
|
||||||
if (rxa.agc.p->max_input > rxa.agc.p->min_volts)
|
if (rxa.agc->max_input > rxa.agc->min_volts)
|
||||||
{
|
{
|
||||||
convert = pow (10.0, hangLevel / 20.0);
|
convert = pow (10.0, hangLevel / 20.0);
|
||||||
tmp = std::max(1e-8, (convert - rxa.agc.p->min_volts) / (rxa.agc.p->max_input - rxa.agc.p->min_volts));
|
tmp = std::max(1e-8, (convert - rxa.agc->min_volts) / (rxa.agc->max_input - rxa.agc->min_volts));
|
||||||
rxa.agc.p->hang_thresh = 1.0 + 0.125 * log10 (tmp);
|
rxa.agc->hang_thresh = 1.0 + 0.125 * log10 (tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rxa.agc.p->hang_thresh = 1.0;
|
rxa.agc->hang_thresh = 1.0;
|
||||||
|
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::GetAGCHangThreshold(RXA& rxa, int *hangthreshold)
|
void WCPAGC::GetAGCHangThreshold(RXA& rxa, int *hangthreshold)
|
||||||
//for slider in setup
|
//for slider in setup
|
||||||
{
|
{
|
||||||
*hangthreshold = (int) (100.0 * rxa.agc.p->hang_thresh);
|
*hangthreshold = (int) (100.0 * rxa.agc->hang_thresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCHangThreshold (RXA& rxa, int hangthreshold)
|
void WCPAGC::SetAGCHangThreshold (RXA& rxa, int hangthreshold)
|
||||||
//For slider in setup
|
//For slider in setup
|
||||||
{
|
{
|
||||||
rxa.agc.p->hang_thresh = (double) hangthreshold / 100.0;
|
rxa.agc->hang_thresh = (double) hangthreshold / 100.0;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::GetAGCThresh(RXA& rxa, double *thresh, double size, double rate)
|
void WCPAGC::GetAGCThresh(RXA& rxa, double *thresh, double size, double rate)
|
||||||
//for line on bandscope.
|
//for line on bandscope.
|
||||||
{
|
{
|
||||||
double noise_offset;
|
double noise_offset;
|
||||||
noise_offset = 10.0 * log10((rxa.nbp0.p->fhigh - rxa.nbp0.p->flow) * size / rate);
|
noise_offset = 10.0 * log10((rxa.nbp0->fhigh - rxa.nbp0->flow) * size / rate);
|
||||||
*thresh = 20.0 * log10( rxa.agc.p->min_volts ) - noise_offset;
|
*thresh = 20.0 * log10( rxa.agc->min_volts ) - noise_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCThresh(RXA& rxa, double thresh, double size, double rate)
|
void WCPAGC::SetAGCThresh(RXA& rxa, double thresh, double size, double rate)
|
||||||
//for line on bandscope
|
//for line on bandscope
|
||||||
{
|
{
|
||||||
double noise_offset;
|
double noise_offset;
|
||||||
noise_offset = 10.0 * log10((rxa.nbp0.p->fhigh - rxa.nbp0.p->flow) * size / rate);
|
noise_offset = 10.0 * log10((rxa.nbp0->fhigh - rxa.nbp0->flow) * size / rate);
|
||||||
rxa.agc.p->max_gain = rxa.agc.p->out_target / (rxa.agc.p->var_gain * pow (10.0, (thresh + noise_offset) / 20.0));
|
rxa.agc->max_gain = rxa.agc->out_target / (rxa.agc->var_gain * pow (10.0, (thresh + noise_offset) / 20.0));
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::GetAGCTop(RXA& rxa, double *max_agc)
|
void WCPAGC::GetAGCTop(RXA& rxa, double *max_agc)
|
||||||
//for AGC Max Gain in setup
|
//for AGC Max Gain in setup
|
||||||
{
|
{
|
||||||
*max_agc = 20 * log10 (rxa.agc.p->max_gain);
|
*max_agc = 20 * log10 (rxa.agc->max_gain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCTop (RXA& rxa, double max_agc)
|
void WCPAGC::SetAGCTop (RXA& rxa, double max_agc)
|
||||||
//for AGC Max Gain in setup
|
//for AGC Max Gain in setup
|
||||||
{
|
{
|
||||||
rxa.agc.p->max_gain = pow (10.0, (double) max_agc / 20.0);
|
rxa.agc->max_gain = pow (10.0, (double) max_agc / 20.0);
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCSlope (RXA& rxa, int slope)
|
void WCPAGC::SetAGCSlope (RXA& rxa, int slope)
|
||||||
{
|
{
|
||||||
rxa.agc.p->var_gain = pow (10.0, (double) slope / 20.0 / 10.0);
|
rxa.agc->var_gain = pow (10.0, (double) slope / 20.0 / 10.0);
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCFixed (RXA& rxa, double fixed_agc)
|
void WCPAGC::SetAGCFixed (RXA& rxa, double fixed_agc)
|
||||||
{
|
{
|
||||||
rxa.agc.p->fixed_gain = pow (10.0, (double) fixed_agc / 20.0);
|
rxa.agc->fixed_gain = pow (10.0, (double) fixed_agc / 20.0);
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WCPAGC::SetAGCMaxInputLevel (RXA& rxa, double level)
|
void WCPAGC::SetAGCMaxInputLevel (RXA& rxa, double level)
|
||||||
{
|
{
|
||||||
rxa.agc.p->max_input = level;
|
rxa.agc->max_input = level;
|
||||||
loadWcpAGC ( rxa.agc.p );
|
loadWcpAGC ( rxa.agc );
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************************
|
/********************************************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user