For non-interactive output (writing to an audio file), generate the
idle output carrier for same duration that the input is idle. Makes
this case generate an output .wav file of just over 1 second duration:
{ echo hello; sleep 1; echo world; } | minimodem --tx -f /tmp/xx.wav 300
Clean up the "emit idle tone" code, which should never have involved
tx_leader_bits_len (that was a copy-paste laziness).
"Emit idle tone" simply generates the idle tone for a hardcoded period
of time now codified as 'idle_tone_usec' and set to 1/25 of a second
(to match the existing behavior).
The logic that determined whether to 'block_input' was backwards with
respect to non-interactive --file sessions, such that using --file
*enabled* the tx-carrier behavior when it should have disabled it.
This went unnoticed because on reasonably fast systems, reading the
input data from the file never induce the timeout anyway -- only very
slow machines reveal the problem: long gaps of 'mark' between each
frame, as if each input character was slowly typed interactively.
Fixes: ecebf01 Add ability to output a carrier while waiting for data
Emit a preamble of 16 (hardcoded) sync-bytes if --sync-byte is
specified with --tx mode. This makes --tx SAME emit the required
preamble of 16 0xAB's automatically. So --rx SAME now directly
decodes the output of --tx SAME without needing to manually inject
the preamble byte(s), simplifying the test case.
Thanks to Harold Giddings, for reporting the issue.
Now, minimodem prints all received bytes without isprint() filtering,
unless --print-filter is specified. Allows for binary file transfers
and multibyte characters.
Un-break tx_interactive: minimodem enables tx_interactive whenever the
stream_name is NULL, so go back to using the stream_name as the sndfile
filename.
FSK_ANALYZE_NSTEPS was previously 10.
Now FSK_ANALYZE_NSTEPS_CARRIER_LOCK is 100, and FSK_ANALYZE_NSTEPS is
reduced to 4.
(Also, try_confidence_search_limit = INFINITY on carrier acquisition frame).
Effects: Better initial phase lock on signal in the first
place; sloppier tracking of fast/slow signals; reduced longterm CPU load.