$ fl2k_file fl2k_file, a sample player for FL2K VGA dongles
Usage: [-d device_index (default: 0)] [-r repeat file (default: 1)] [-s samplerate (default: 100 MS/s)] filename (use '-' to read from stdin)
$ fl2k_file -s 8192000 - Failed to open -
I'm perfectly willing to pitch in and fix this. How do you prefer to receive contributions?
Dear all,
On 20/05/18 19:27, Sylvain Munaut wrote:
Patch posted on the mailing list, preferrably using git-send-email so the format is standardized.
I don't have git-send-email set up, enclosed is a patch that adds interleaved I/Q -> Red/Green output. I hope this is of interest to you.
Cheers mpb
--- src/fl2k_file.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/fl2k_file.c b/src/fl2k_file.c index 1d3697d..a3df0f0 100644 --- a/src/fl2k_file.c +++ b/src/fl2k_file.c @@ -145,11 +145,15 @@ int main(int argc, char **argv) if (dev_index < 0) exit(1);
- file = fopen(filename, "rb"); - if (!file) { - fprintf(stderr, "Failed to open %s\n", filename); - goto out; - } + if (!strcmp(filename, "-")){ + file = stdin; + } else { + file = fopen(filename, "rb"); + if (!file) { + fprintf(stderr, "Failed to open %s\n", filename); + goto out; + } + }
txbuf = malloc(FL2K_BUF_LEN); if (!txbuf) {
Hi Ted,
thanks for reporting this, I've just comitted a fix. I've just copied it from fl2k_fm, which already has this functionality including a quirk for Windows.
Regards, Steve