Add alt code to 2014/vik

This is based on the author's remarks and it theoretically will work
with Microsoft Windows compilers (assuming that anything works with
Windows, of course :-) ). It's not been tested because I'm blessed
enough to not have a way to test it but it should be fine unless
something has changed since 2014.

As I was updating the thanks file I made a simple clarification for
another entry as well but it has no relation to this commit - it's just
in the way because I saw it and wanted to fix it and since it's not
anything other than slight rewording I don't see that it needs a
separate commit.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-15 08:35:14 -07:00
1 parent d1134b23d9
commit 6f54faeb4b
5 files changed
+60 -6

No files matched your search

+18 -2
View File
@@ -13,13 +13,15 @@ US
make
```
## To run:
```sh
./prog > foo.c
```
There is an alternate version that will theoretically work with Windows
compilers (if anything in Windows works :-) ). See the [Alternate
code](#alternate-code) section below.
## Try:
@@ -29,6 +31,18 @@ echo 'Want to hear me beep?' | ./prog > audio_file.raw
echo 'No. I want chocolate!' | ./prog | mplayer -demuxer rawaudio -
```
### Alternate code:
The alternate code, [prog.alt.c](prog.alt.c), is based on the author's
instructions on how to get it to work with Windows. This has not been tested but
in order to use it you can do:
```sh
make alt
```
Use `prog.alt` as you would `prog` above as well as below.
## Judges' remarks:
@@ -59,7 +73,7 @@ I can tell, there are at least six chocolate references in this program.
This program can convert text to Morse to a raw 44.1kHz stereo audio file.
Via streaming to mplayer, you can listen to the Morse audio.
Don't forget the last '-' as it makes mplayer read from stdin.
Don't forget the last '`-`' as it makes mplayer read from stdin.
## Convert audio file with Morse signals to text
@@ -86,6 +100,8 @@ declaration in order for the program to run correctly:
_setmode(_fileno(stdout), 0x8000);
```
NOTE: see the [alternate code](prog.alt.c) for this.
### Known Issues
The program uses a quite simple algorithm for detecting tone on and off events