mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-23 08:24:44 +01:00
maybe macOS fixes and other
This commit is contained in:
parent
53afaeda9e
commit
834890b69a
@ -10,6 +10,12 @@ namespace dsp::channel {
|
|||||||
|
|
||||||
RxVFO(stream<complex_t>* in, double inSamplerate, double outSamplerate, double bandwidth, double offset) { init(in, inSamplerate, outSamplerate, bandwidth, offset); }
|
RxVFO(stream<complex_t>* in, double inSamplerate, double outSamplerate, double bandwidth, double offset) { init(in, inSamplerate, outSamplerate, bandwidth, offset); }
|
||||||
|
|
||||||
|
~RxVFO() {
|
||||||
|
if (!base_type::_block_init) { return; }
|
||||||
|
base_type::stop();
|
||||||
|
taps::free(ftaps);
|
||||||
|
}
|
||||||
|
|
||||||
void init(stream<complex_t>* in, double inSamplerate, double outSamplerate, double bandwidth, double offset) {
|
void init(stream<complex_t>* in, double inSamplerate, double outSamplerate, double bandwidth, double offset) {
|
||||||
_inSamplerate = inSamplerate;
|
_inSamplerate = inSamplerate;
|
||||||
_outSamplerate = outSamplerate;
|
_outSamplerate = outSamplerate;
|
||||||
|
@ -14,7 +14,12 @@ namespace dsp::correction {
|
|||||||
|
|
||||||
void init(stream<T>* in, double rate) {
|
void init(stream<T>* in, double rate) {
|
||||||
_rate = rate;
|
_rate = rate;
|
||||||
reset();
|
if constexpr (std::is_same_v<T, float>) {
|
||||||
|
offset = 0.0f;
|
||||||
|
}
|
||||||
|
if constexpr (std::is_same_v<T, complex_t> || std::is_same_v<T, stereo_t>) {
|
||||||
|
offset = { 0.0f, 0.0f };
|
||||||
|
}
|
||||||
base_type::init(in);
|
base_type::init(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,12 @@ namespace dsp::multirate {
|
|||||||
|
|
||||||
RationalResampler(stream<T>* in, double inSamplerate, double outSamplerate) { init(in, inSamplerate, outSamplerate); }
|
RationalResampler(stream<T>* in, double inSamplerate, double outSamplerate) { init(in, inSamplerate, outSamplerate); }
|
||||||
|
|
||||||
|
~RationalResampler() {
|
||||||
|
if (!base_type::_block_init) { return; }
|
||||||
|
base_type::stop();
|
||||||
|
taps::free(rtaps);
|
||||||
|
}
|
||||||
|
|
||||||
void init(stream<T>* in, double inSamplerate, double outSamplerate) {
|
void init(stream<T>* in, double inSamplerate, double outSamplerate) {
|
||||||
_inSamplerate = inSamplerate;
|
_inSamplerate = inSamplerate;
|
||||||
_outSamplerate = outSamplerate;
|
_outSamplerate = outSamplerate;
|
||||||
|
@ -12,6 +12,7 @@ namespace dsp::noise_reduction {
|
|||||||
|
|
||||||
~Squelch() {
|
~Squelch() {
|
||||||
if (!base_type::_block_init) { return; }
|
if (!base_type::_block_init) { return; }
|
||||||
|
base_type::stop();
|
||||||
buffer::free(normBuffer);
|
buffer::free(normBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ namespace dsp::sink {
|
|||||||
int count = base_type::_in->read();
|
int count = base_type::_in->read();
|
||||||
if (count < 0) { return -1; }
|
if (count < 0) { return -1; }
|
||||||
|
|
||||||
|
if (data.write(_in->readBuf, count) < 0) { return -1; }
|
||||||
|
|
||||||
base_type::_in->flush();
|
base_type::_in->flush();
|
||||||
return count;
|
return count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user