Merge pull request #16 from howard0su/fix_vfo

Freq can be zero
pull/29/head
AlexandreRouma 2020-09-06 16:42:41 +03:00 zatwierdzone przez GitHub
commit 7e6f24d203
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -16,7 +16,7 @@ namespace dsp {
_blockSize = blockSize;
_sampleRate = sampleRate;
_frequency = frequency;
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / frequency);
_phasorSpeed = (2 * 3.1415926535 * frequency) / sampleRate;
_phase = 0;
}
@ -25,7 +25,7 @@ namespace dsp {
_sampleRate = sampleRate;
_blockSize = blockSize;
_frequency = frequency;
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / frequency);
_phasorSpeed = (2 * 3.1415926535 * frequency) / sampleRate;
_phase = 0;
}
@ -61,7 +61,7 @@ namespace dsp {
void setSampleRate(float sampleRate) {
_sampleRate = sampleRate;
_phasorSpeed = (2 * 3.1415926535) / (sampleRate / _frequency);
_phasorSpeed = (2 * 3.1415926535 * _frequency) / sampleRate;
}
stream<complex_t> output;