Open comparchitect opened 3 years ago
Wow, I was looking at this the other day, and didn't realize you could do this, I was wanting to implement something similar, but didn't know how to go about it.
I have a fork of the rtl-sdr branch with more things added, if you wanted to give it a try out. I just pushed your suggestion onto my own fork, and would love to hear some feedback on how it works for you. I can also use people making helpful suggestions like this.
In the future, I'm going to try to take some of my own things and make a pull request to the rtl-sdr branch here and also some things to LouisErigHerve fork if I make a lot of good progress.
Thanks for building the rtl-sdr branch.
I noticed that rtl_sdr_fm.cpp has the sample rate hard coded to 48000 which seems to produce a signal with 48000Hz bandwidth.
In my tests it seems to work better with the sample rate hard coded to 8000 or 12000Hz to produce a narrow FM signal and then upscale that to 48000Hz to work with the rest of the dsd code.
This is simple to implement for tests: e.g.,
on line 34: #define DEFAULT_SAMPLE_RATE 12000
and then on line 579+:
o->queue.push(d->result[i]); o->queue.push(d->result[i]); o->queue.push(d->result[i]); o->queue.push(d->result[i]);
I.e., each sample is pushed 4 times to get back to the 48000Hz the rest of the dsd code relies on.
Just putting this thought on the issue tree here. Perhaps implementing a command line option for dsd that allows the user to choose between a few signal bandwidths like 6k, 8k, 12k, 24k, 48k would be simple and useful.