mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-10-21 13:19:22 +02:00
FM stereo prototype
This commit is contained in:
@@ -279,11 +279,6 @@ namespace dsp {
|
||||
float error;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
||||
// Mix the VFO with the input to create the output value
|
||||
outVal.re = (lastVCO.re*_in->readBuf[i].re) - ((-lastVCO.im)*_in->readBuf[i].im);
|
||||
outVal.im = ((-lastVCO.im)*_in->readBuf[i].re) + (lastVCO.re*_in->readBuf[i].im);
|
||||
|
||||
out.writeBuf[i] = lastVCO;
|
||||
|
||||
// Calculate the phase error estimation
|
||||
@@ -292,9 +287,6 @@ namespace dsp {
|
||||
if (error > 3.1415926535f) { error -= 2.0f * 3.1415926535f; }
|
||||
else if (error <= -3.1415926535f) { error += 2.0f * 3.1415926535f; }
|
||||
|
||||
// if (error > 1.0f) { error = 1.0f; }
|
||||
// else if (error < -1.0f) { error = -1.0f; }
|
||||
|
||||
// Integrate frequency and clamp it
|
||||
vcoFrequency += _beta * error;
|
||||
if (vcoFrequency > 1.0f) { vcoFrequency = 1.0f; }
|
||||
|
Reference in New Issue
Block a user