Closed aquila12 closed 9 years ago
ALSA seems to accept arbitrarily large amounts of data rather than blocking, which makes it break with --tx-carrier. [ Fixed in subsequent commit ]
If ALSA latency needs to vary from system to system, it might be worth having a command-line option for it.
Thanks for your minimodem enhancements, Nick! I'll review this and respond early next week.
Tweaks as requested - also squashed into two commits.
Looks great, Nick! Thanks again for --tx-carrier. Very useful!
I've added a non-blocking capability, using read() in place of getchar(), and using select() to check whether there is data on the input. This means a carrier tone can persist on the line if desired, even when waiting for input data.
To cope with the 'idle' line state, I've used a value of 2 in tx_transmitting to signal that the preamble has been set, where 1 now reflects that the carrier has been present for the necessary time. This enables sync bytes to be sent before actual data, even when the carrier is being transmitted.