Program doesn't seem to do anything other than show usage
WA6YDQ opened this issue · comments
./apt137 -v -a file1 -b file2 -r 11025 -n 090729*8bit.wav
results in:
Usage: ./apt137 [OPTION]... [FILE]
Decode APT signal from audio.
Read audio from STDIN if FILE is not specified.
Options:
-r RATE sample rate
-a FILE write channel A to FILE
-b FILE write channel B to FILE
-n normalize image intensity
-v verbose output
What am I missing?
I just compiled the tool again and ran your exact command and it doesn't show the usage for me:
$ ./apt137 -v -a file1 -b file2 -r 11025 -n 090729*8bit.wav
fopen(input): No such file or directory
It doesn't work because I don't have that file, of course.
Are you sure there aren't any other args in the command you tried?
I re-compiled, and I get the following error messages (just warnings - the program did compile OK):
pi@gadget5:~/apt137 $ make
cc -std=c99 -Wall -Wextra -g -ggdb -D_POSIX_C_SOURCE=200809 -c -o main.o main.c
main.c: In function ‘usage’:
main.c:12:16: warning: unused parameter ‘argc’ [-Wunused-parameter]
void usage(int argc, char **argv) {
~~~~^~~~
main.c: In function ‘main’:
main.c:54:47: warning: comparison is always true due to limited range of data type [-Wtype-limits]
while ((c = getopt(argc, argv, "a:b:r:nv")) != -1) {
^~
main.c:56:5: warning: case label value is less than minimum value for type
case -1:
^~~~
cc -std=c99 -Wall -Wextra -g -ggdb -D_POSIX_C_SOURCE=200809 -c -o channel.o channel.c
cc -std=c99 -Wall -Wextra -g -ggdb -D_POSIX_C_SOURCE=200809 -c -o decoder.o decoder.c
cc -std=c99 -Wall -Wextra -g -ggdb -D_POSIX_C_SOURCE=200809 -o apt137 main.o channel.o decoder.o -lm
No other args in the command, just as I cut/pasted.
(not sure why the comments above are crossed out)
Regarding the markup: it's markdown, so a ~
means a strikeout. I added a triple ~~~
around the code to make it render in a monospace font. You can read more about markdown at https://guides.github.com/features/mastering-markdown/.
This dump does give me a clue for the error. I'll whip up a short patch and post back here.
Could you update the repository to the latest version and try again?
Recompiled, no errors or warnings other than the unused argc variable. Running just fine now.
Thank you for the quick response!
Kurt
Excellent! Could you post the resulting images? Haven't seen this tool work in 5 years, at least, and happy to hear it still works!
Thank you!