mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-26 17:44:44 +01:00
Freq can be zero
In Zero-IF scenerio, freq can be zero.
This commit is contained in:
parent
7190acfe9e
commit
70c2ef36f5
@ -16,7 +16,7 @@ namespace dsp {
|
|||||||
_blockSize = blockSize;
|
_blockSize = blockSize;
|
||||||
_sampleRate = sampleRate;
|
_sampleRate = sampleRate;
|
||||||
_frequency = frequency;
|
_frequency = frequency;
|
||||||
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / frequency);
|
_phasorSpeed = (2 * 3.1415926535 * frequency) / sampleRate;
|
||||||
_phase = 0;
|
_phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ namespace dsp {
|
|||||||
_sampleRate = sampleRate;
|
_sampleRate = sampleRate;
|
||||||
_blockSize = blockSize;
|
_blockSize = blockSize;
|
||||||
_frequency = frequency;
|
_frequency = frequency;
|
||||||
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / frequency);
|
_phasorSpeed = (2 * 3.1415926535 * frequency) / sampleRate;
|
||||||
_phase = 0;
|
_phase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ namespace dsp {
|
|||||||
|
|
||||||
void setSampleRate(float sampleRate) {
|
void setSampleRate(float sampleRate) {
|
||||||
_sampleRate = sampleRate;
|
_sampleRate = sampleRate;
|
||||||
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / _frequency);
|
_phasorSpeed = (2 * 3.1415926535 * _frequency) / sampleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream<complex_t> output;
|
stream<complex_t> output;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user