Notes on rtl-sdr source code – first impressions

I did a quick read of source code (rtl-fm.c) today.

Basically it opens an input stream of IQ samples from the rtl-sdr device, demodulates filters, and outputs audio.

Other than usual madness with threads and locking – the code is fairly straightforward. Not well commented – but clear enough that we could extract the input streaming and frequency (device) control to make a Max external. One question would be whether or not to do the downsampling in the external, or in Max?

Rough estimate would be this project would involve about 1-2 weeks of analysis and hacking. Possibly less – but there is a learning curve – and a heuristic stuff which is required to work with the hardware.

Fortunately it actually works in MacOS and Windows – and there are plenty of other examples to compare it to. But this is not a casual evening project.