ghpsdr3-alex
ghpsdr3-alex copied to clipboard
Auto Squelch for FM
Hello. A simple automatic squelch for FM. Useful for those who listen to FM glsdr without getting a headache.
diff --git a/trunk/src/DttSP/fm_demod.c b/trunk/src/DttSP/fm_demod.c index 7e8eecb..d4197d2 100644 --- a/trunk/src/DttSP/fm_demod.c +++ b/trunk/src/DttSP/fm_demod.c @@ -86,13 +86,14 @@ pll (FMD fm, COMPLEX sig) void FMDemod (FMD fm) {
- int i;
- int i,mute; for (i = 0; i < CXBsize (fm->ibuf); i++) { pll (fm, CXBdata (fm->ibuf, i)); fm->afc = (REAL) (0.9999 * fm->afc + 0.0001 * fm->pll.freq.f);
-
if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } CXBreal (fm->obuf, i) =
-
CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) \* fm->cvt;
-
} }CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) \* fm->cvt \* mute;
Regards.....
Are you sure that in:
- if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } CXBreal (fm->obuf, i) =
- CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt;
- CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt * mute;
You only want CXBimag(fm->obuf,i) to be 0? What about CXBreal(fm->obuf,i) ?
Alex
On Fri, Oct 28, 2016 at 7:03 PM, vigeruno [email protected] wrote:
Hello. A simple automatic squelch for FM. Useful for those who listen to FM glsdr without getting a headache.
diff --git a/trunk/src/DttSP/fm_demod.c b/trunk/src/DttSP/fm_demod.c index 7e8eecb..d4197d2 100644 --- a/trunk/src/DttSP/fm_demod.c +++ b/trunk/src/DttSP/fm_demod.c @@ -86,13 +86,14 @@ pll (FMD fm, COMPLEX sig) void FMDemod (FMD fm) {
- int i;
- int i,mute; for (i = 0; i < CXBsize (fm->ibuf); i++) { pll (fm, CXBdata (fm->ibuf, i)); fm->afc = (REAL) (0.9999 * fm->afc + 0.0001 * fm->pll.freq.f);
- if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } CXBreal (fm->obuf, i) =
- CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt;
- CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt * mute; } }
Regards.....
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9cAhZXZAiESj22832-9S9FNZoraTks5q4daZgaJpZM4KjUzG .
Hello.
Yes.
https://github.com/vigeruno/ghpsdr3-vigeruno/blob/master/trunk/src/DttSP/fm_demod.c
You can listen live on ik6fjn ik6ioq server glsdr or qtradio
Regards.....
Ok I see :)
I have updated the repo with a slight change. Please test.
On Fri, 28 Oct, 2016 8:51 pm vigeruno, [email protected] wrote:
Hello. [image: schermata del 2016-10-28 14-47-38] https://cloud.githubusercontent.com/assets/22787199/19806900/d5562944-9d1d-11e6-863f-60729ce6ab7a.png
https://github.com/vigeruno/ghpsdr3-vigeruno/blob/master/trunk/src/DttSP/fm_demod.c
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43#issuecomment-256912408, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9Z4a0Xh-STYExS6jDtpcJZ_3jBKkks5q4e_RgaJpZM4KjUzG .
Hello.
It works with this change:
if (fm->afc < 0.000001){ mute = 1; } else { mute = 0; } yes
if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } not working
Regards.....
Ok. Corrected.
On Sun, 30 Oct, 2016 1:51 am vigeruno, [email protected] wrote:
Hello.
It works with this change: if (fm->afc < 0.000001){ mute = 1; } else { mute = 0; } yes if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } not working [image: autosquelch] https://cloud.githubusercontent.com/assets/22787199/19831682/6ec01502-9e10-11e6-8c73-53b6400e50f6.png [image: pollice_alto] https://cloud.githubusercontent.com/assets/22787199/19831706/ef2c3f68-9e10-11e6-9ad2-e87dbc767db1.jpeg
Regards.....
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43#issuecomment-257105735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9SbkrVR5LWrOfWIG-eetqusS9lgLks5q44eQgaJpZM4KjUzG .