Release of unixcw version 3.6.0.
Changes since version 3.5.1:
libcw:
libcw no longer uses signals (and SIGALRM in particular) for any internal purpose. Internal communication between generator and queue has been re-implemented using other mechanism: pthread_cond_wait() and pthread_cond_broadcast().
In relation to the above, in order to avoid calling of pthread_cond_wait() and pthread_cond_broadcast() in signal handlers, the SIG_IGN and SIG_DFL values registered with cw_register_signal_handler() are completely ignored. It is strongly advised to avoid any libcw cleanup or calls to exit() in signal handlers (registered with either with cw_register_signal_handler() or with more direct methods).
Enabling ALSA's configuration of HW period size.
libcw's ALSA code now tries to configure HW period size to be smaller than in previous versions of code. Normally the period size could be in range of hundreds of frames, now it's possible to have the period size of tens, or low hundreds of frames.
Decreased period size should lead to better behaviour of ALSA's writei() function: the function should now properly block during write of samples to ALSA handle in all circumstances.
Correct blocking behaviour of writei() should lead to correct behaviour of libcw's internal keying mechanism, responsible e.g. for calling keying callbacks registered by programs using libcw (such as cwdaemon). Such callbacks will be now called at proper time intervals that match duration of enqueued dots/dashes/spaces.
Initial report of incorrect behaviour, initial debugging, and confirmation of a fix come from Matthew M5EVT. Thanks Matthew!
ALSA period size (in samples) used by applications (cw, cwcp, xcwcp) can be specified in command line through --alsa-period-size command line arg.
Modifying PulseAudio parameters to decrease XRUNS and improve behaviour of callback registered by client code in library.
Integrating these two commits from Matthew M5EVT
https://github.com/m5evt/unixcw-3.5.1/commit/2d5491a461587ac4686e2d1b897619c98be05c9e
https://github.com/m5evt/unixcw-3.5.1/commit/c86785b595a6d711aae915150df2ccb848ace05c
The result is a better behaviour of PulseAudio sound sink, a bit similar to ALSA improvements mentioned above. Thanks again, Matthew!
Behaviour of cw_lookup_phonetic() library function has been modified: the function now accepts NULL as a second argument (output buffer).
Several items in libcw_debug.h are marked as deprecated. These items should be used only internally, during development of libcw, and should not be used by client code. They will be removed from the header in the future.
Declaration of cw_debug_print_flags() has been removed from libcw_debug.h header. The function was not defined in the library, so no one could have used the function.
Function cw_generator_set_tone_slope() from libcw.h is now marked as deprecated. The function was/is unusable because there is no way that client code can pass a cw_gen_t variable as first argument.
Replacing some usages of double type with float type. There is very little (or maybe even nothing) in the library that would require precision or range of double.
Adding new function: cw_generator_remove_last_character(). The function removes last character enqueued to generator, it can be called multiple times to remove a group of characters. The function can be used e.g. in reaction to Backspace character pressed in User Interface.
This functionality was implemented by Zoltan Csahok and merged here: https://sourceforge.net/p/unixcw/code/merge-requests/1/ , but it has been rewritten a bit: removing of character must be explicit, through the function call.
The initial solution was affecting which characters are classified by libcw as valid and which aren't, and it may have broken some legacy code. Also using Backspace to remove a character is a User Interface concept, which in cwcp and xcwcp is handled explicitly by UI code, not implicitly by library code. Therefore I decided to rework the initial solution and add the new function to library.
Modifications to receiver functions:
cw_receive_character(), cw_receive_representation(), cw_start_receive_tone() and cw_end_receive_tone() are now actually setting errno to EINVAL (as described in documentation) when they detect that input timestamp (when the timestamp is non-NULL) is in some way invalid.
cw_receive_buffer_dot() and cw_receive_buffer_dash() set additional value of errno (EINVAL) when they detect that input timestamp (when the timestamp is non-NULL) is in some way invalid.
Please review information in man page about errno values set by these functions.
cw_wait_for_tone_queue_critical() now sets errno to EINVAL and returns CW_FAILURE if function's argument is negative.
There is a hard limit on length of name of sound device: 127 characters (+1 for terminating NUL).
Fixing Debian bug #979113 ( https://bugs.debian.org/979113 ).
Library soname/version changed from 6.6.1 to 7.0.0.
xcwcp:
Program's command line option "--sound" has been changed to "--system", for consistency with similar option in other unixcw programs.
Release of unixcw version 3.5.1.
Changes since version 3.5.0:
libcw:
Fixing a bug in libcw/generator that may have lead to a key being permanently in "down" state upon silencing a generator. If cwdaemon using libcw with NULL or Console output was generating tones from user input, and received ESC-4 escape request ("Abort currently sent message"), it was possible that while the message was interrupted, the key remained in "down" state. The fix in libcw makes sure that upon request to stop generating tones, the key always goes up, regardless of audio output type. The bug was reported and investigated, and fix was provided by Csahok Zoltan. Many thanks Zoli!
Library soname/version changed from 6.5.1 to 6.6.1.
xcwcp:
Fixing problem with compilation of application.cc file.
At this point I should mention that there is an experimental branch in git repository with experimental version of libcw. The library will allow creation of multiple instances of generator, key and receiver in a single application.
Release of unixcw version 3.5.0.
Changes since version 3.4.2:
libcw:
Adding few more small tests.
Trying to fix a problem of short space. The problem occurs when client application has registered low-tone-queue callback, the threshold for the callback is set to 1, and a single end-of-word space has been enqueued by client application. When the eow space is enqueued as a single tone-queue tone (or even as two tones) ("short space"), older versions of libcw may miss the event of passing of tone queue level from 2 to 1 and will not call the callback.
Library soname/version changed from 6.4.1 to 6.5.1.
xcwcp:
Porting the application from Qt4 to Qt5
This is an official release of unixcw version 3.4.2.
Changes since version 3.4.1:
libcw:
Fixing one possible cause of segfaults in generator code (segfaults occurred when pthread_kill() was called with invalid thread ID in some specific circumstances).
Fixing another problem with libcw: when a generator is created, then is *not* started, and then is deleted, libcw called pthread_kill(&id, ...) on uninitialized id in cw_gen_delete(). This caused a program to crash.
Fixing problems with OSS and generator modules that surfaced during tests on Alpine Linux.
Expanding unit tests.
libcw is now compiled with -DNDEBUG flag by default (asserts are "off"). The asserts are still "on" by default in "unit tests" libcw. Asserts are switched "on" in base libcw with " ./configure --enable-dev ".
cw_generator_set_tone_slope(): some corner cases of handling function's arguments were cleared in function's top level comments, and implementation has been updated accordingly.
Library soname/version changed from 6.3.1 to 6.4.1.
This is an official release of unixcw version 3.4.1.
Changes since version 3.4.0:
libcw:
The remainder of code from libcw.c has been moved to respective module files. New module file has been created: libcw_rec.c - it contains receiver code. I think that number of modules won't change anymore. libcw.c has been removed, all functionality is now implemented by module files.
A number of unit test functions has been moved from libcw_test_public.c to respective module files. These functions can be executed independently, so there is no reason to keep them in libcw_test_public.c. They can be kept in module files, close to tested library functions. libcw_test_public.c is now less difficult to work with. The moved test functions are now executed while building "make check" target, so they should be called more often, increasing the chances of catching problems early.
Data sets for some of receiver's unit tests are now generated by helper functions. This allowed me to increase size of the data sets and increase variation of the data (both for fixed speed receiving and for adaptive receiving).
The data sets are basically timing tables used to drive the receiver - to test main functions of the receiver, responsible for accepting mark/space events from client code.
The increased size and variation of the test data gives me more confidence that the core functionality of the receiver works as expected.
If you run libcw in debugging mode and you depend on Receiver State names (strings starting with RS_) printed by library's debug messages, you may want to check changed values of RS enum and corresponding strings on top of libcw_rec.c - they have been changed.
Some changes have been made to library functions (mainly in generator and receiver modules) to ensure that the code separated between modules can be compiled and that it works as expected. Since receiver code has been put in a separate file, it was possible to review and refactor the receiver code a bit.
No functionality of the library has been changed, with an exception described in next point.
Data type of receiver's speed is now internally a float instead of int. This change improves behaviour of adaptive receiving algorithm a bit. It's not a big change, but it may positively impact client code using receiver functions.
libcw_test_public test executable now accepts '-m' command line option (for selecting module(s)) to test. Check output of 'libcw_test_public -h' for more details.
Since the modification described above does not change how the library works, nor does it change any API, there is no reason for any major revision changes. Library soname/version has been changed from 6.2.1 to 6.3.1.
This is an official release of unixcw version 3.4.0.
No changes have been made in source code compared to version 3.4.0-RC.
Changes since version 3.3.1:
unixcw:
libcw:
cwcp:
Release Candidate for unixcw version 3.4.0 is available in git repository.
If you want to:
then you should definitely check out unixcw 3.4.0-RC available in git repository (git tag: v3.4.0-RC). Check NEWS file for more details on changes in unixcw 3.4.0.
I will make a proper release later.
Release of unixcw version 3.3.1
Changes since version 3.3.0:
libcw:
Big *thank you* to Pino Zollo ZP4KFX for reporting a problem with cwdaemon and for helping to solve it in cwdaemon and in libcw.
Release of unixcw version 3.3.0
Changes since version 3.2.0:
unixcw:
libcw:
cw_character_is_valid()
(replaces
cw_check_character()
)
cw_string_is_valid()
(replaces
cw_check_string()
)
cw_iambic_keyer_register_timer()
xcwcp:
cwgen:
cwutils:
__attribute__((deprecated("message")))
construct in cwutils/dictionary.h may have lead to
compilation failure. This has been fixed by getting rid
of "message" argument.
Release of unixcw version 3.2.0
Changes since version 3.1.1:
unixcw:
libcw:
__attribute__ ((deprecated(msg)))
facility in libcw.h. A user has reported errors related
to the attribute when compiling libcw with gcc
4.3.3.
cwcp:
Release of unixcw version 3.1.1
Changes since version 3.1.0:
libcw:
Release of unixcw version 3.1.0
Changes since version 3.0.2:
unixcw:
libcw:
This small image below shows the benefits of new design. Upper part of the screenshot is sound of two letters 'h', produced by libcw3, the lower part shows sound of the same letters produced by libcw4. (The screenshot shows wave plot in Audacity).
Following functions are deprecated:
Use these instead:
cwcp:
Release of unixcw version 3.0.2
New version. You won't find it in git repo, but only in SourceForge download area and on Debian webpage. This is a special release with two changes related to Debian packaging.
Changes since version 3.0.1:
debian/:
Thanks to Kamal Mostafa for patiently explaining to me some details of Debian/Ubuntu packaging.
Release of unixcw version 3.0.1
Changes since version 3.0:
debian/:
general:
libcw:
cwcp:
Thanks to Kamal Mostafa for providing patches that are the reason for 3.0.1 release. Content of upstream package unixcw-3.0.1 is approximately the same as of Debian source package unixcw_3.0-5.
Release of unixcw version 3.0
Thanks to Simon Baldwin for creating this software in the first place, and to Kamal Mostafa for helping me with packaging unixcw 3.0 for Debian.
Changes since version 2.3:
unixcw:
libcw:
xcwcp:
Copyright (C) 2011 - 2023 Kamil Ignacak