Commit Briefs

f0814f307b Sven M. Hallberg

stick to rand for portable (portable)

This backs out commit 40c37b5c (use arc4random) except for the header include. Crappy old rand(3) is fine for this program. It's just bad form on OpenBSD and its linker spews an annoying warning about it. FWIW, Linux finally got arc4random(3) with glibc >= 2.36 (2022) so it could actually be considered fairly portable now. However, for the time being, I'd like to still support older systems. NB, the closest "native" alternative, getentropy(3), appears in glibc >= 2.25 (2017), so even it is not exactly ancient, yet. Thus, instead of mucking around with wrappers, feature flags and conditional compilation, rand() is still it for portable.


aba7856aa9 Sven M. Hallberg

add a note about sndiod


87510752bd Sven M. Hallberg

note FreeBSD support


e89d56a85f Sven M. Hallberg

add /usr/local to search paths


2fa1ee118e Sven M. Hallberg

update README (portable version, supporting Linux)


a29471d25a Sven M. Hallberg

define a replacement for getprogname on Linux


d9e925017c Sven M. Hallberg

replace pledge with a no-op outside of OpenBSD


8bf45581e9 Sven M. Hallberg

define timespec helpers if missing


76906c96c9 Sven M. Hallberg

add platform.h

(Empty for now.)


164e782ea2 Sven M. Hallberg

support gmake

GNU make does not have $> (.ALLSRC) but $^ instead. The trick is to just use both since each implementation defines one but not the other. XD


40c37b5c53 Sven M. Hallberg

use arc4random (main)

While crappy old rand(3) is fine for this program and uses arc4random(3) on OpenBSD anyway, the linker spews a warning about it and the noise during compilation is annoying me. FWIW, Linux finally got arc4random(3) with glibc >= 2.36 (2022) so it could actually be considered fairly portable now. However, for the time being, I'd like to still support older systems. NB, the closest "native" alternative, getentropy(3), appears in glibc >= 2.25 (2017), so even it is not exactly ancient, yet. Thur, instead of mucking around with wrappers, feature flags and conditional compilation, rand() is still it for portable.


7100fec23e Sven M. Hallberg

add coefficient (basemul) for base weight


d01528a063 Sven M. Hallberg

use overall rate as baseline weight


7e15a2c893 Sven M. Hallberg

slightly reorder the code in cwinit


0f4e0bbca9 Sven M. Hallberg

clean up return latency code in cwstop


02b03fabec Sven M. Hallberg

remove debug output


237ea00efb Sven M. Hallberg

reset the clock in cwstart

This is a workaround to guard against the possibility that the onmove callback is not called at all. This happens if playback has not started before cwstop(), and hence sio_stop(), is called.


3f64dc1f60 Sven M. Hallberg

fix timing calculation

Measure and take into account the "return latency" of cwstop(), i.e. the time it took between playback stopping ang cwstop() returning, usually negative.


b232461a63 Sven M. Hallberg

try to figure out proper timing

This is an intermediate commit of some experimental changes: - playback in synchronous mode (par.xrun = SIO_SYNC) - tracking of play position via sio_onmove() and total frames written - (broken/ignored) reporting of "time remaining" from sound() and friends - debug instrumentation (#ifdef DEBUGTIME)


ed992560fb Sven M. Hallberg

UI styling


2a60333bac Sven M. Hallberg

fix two typos

Turns out my times were measured in centiseconds rather than milliseconds as advertised. Oops. Only discovered when looking to make them exact for the first time. Had mostly ignored the values as "probably way off anyway". That appears to have been an accurate assessment. X) It does show nicely how the algorithm doesn't care about absolute values. It operated just fine on centiseconds.


7feee87ca3 Sven M. Hallberg

mention MORSE_LEVEL again in README


658c8904c0 Sven M. Hallberg

fix default values in NOTES


4ff4e76f99 Sven M. Hallberg

add CW_AMPLITUDE variable


a7dafd6f19 Sven M. Hallberg

add toc section to README