Features for running a spool directory
Hi, I forked ft8_lib a while ago and made some minor tweaks to run it with my ka9q-radio multichannel SDR. Recently I've made much more substantial tweaks to turn it into a daemon that processes files out of a spool directory. When started, it processes any existing wav files in the directory and then waits for more to appear using the inotify() system call. Decoded spots appear on standard output, which on my systems gets appended to /var/log/ft8.log or /var/log/ft4.log. Errors and tracing appear on standard error, which goes into the journal or syslog. By default, successfully decoded files are deleted after decoding.
Although one instance is plenty fast to handle every HF band simultaneously, I do use full blown locking to allow you to run multiple decoder instances should you need more parallelism. Because the decoder runs independently of the file recording service, you can independently control the degree of parallelism.
If you're interested in these enhancements, I'd be happy to generate some pull requests. I see you've made some of your own since my fork and I'd like them merge them into my stuff too.
If I remember correctly, this project originally was written for STM32 microcontroller and only because @kgoba write excellent and portable code, it is possible to compile and run ft8_lib on big computers. Make any additions in a way that your code will not break compatibility for MCUs.
Very reasonable request. How about if I isolate my code to a separate file that's linked only when decoding from a spool directory, and a stub front end is written for compatibility with the previous interface? There'd be a common entry point to the actual decoder that takes a loaded buffer, size, ft8/ft4 flag, sample rate, frequency search limits, etc. Phil Gladstone has found that the decoder is easy to modify to search a wider frequency range when the sample rate is increased, and I'd like to use that to search both the "standard" and adjacent ad-hoc segments on each band used for fox/hound DXpeditions, etc. Right now I'm running separate decoders on each, and sometimes I get duplicate decodes when a station lands near the border of two adjacent decoder channels. He's also found some "out of channel" operations.