[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The WFDB library now supports storing signals in compressed form, using the FLAC (Free Lossless Audio Codec) algorithm. Compressed signal files are designated by the the format code 508, 516, or 524 (depending on the signal resolution.) In order to read and write signals in these formats, the FLAC library and header files must be installed when compiling the WFDB Software Package.
If the symbol WFDB_LARGETIME
is defined before including wfdb.h
,
then the type WFDB_Time
is defined as a long long
rather than a
long
(see section Large Time Values).
New macros, defined in ‘wfdb.h’, can be used to construct format strings
for printf()
(see section Displaying Numeric Values) and scanf()
(see section Parsing Numeric Values), independent of the underlying data types.
If high-resolution mode is enabled using setgvmode()
, then
sampfreq(r)
will return the highest sampling frequency of any
signal in record r, and subsequent calls to mstimstr()
and
strtim()
will likewise interpret sample and frame numbers just as if the
record were actually opened using isigopen()
.
If an error occurs while writing an output file, the library usually cannot
detect the error until the file is closed. (For example, after calling
putvec()
, the output samples will be buffered, but there might not be
enough disk space to store them.) In order to check that the output was
written successfully, an application can call ‘osigfopen(NULL, 0)’ (for
signal and header files), ‘annopen("", NULL, 0)’ (for annotation files),
or ‘setinfo(NULL)’ (for info files). These function calls also work with
previous versions of the library, but would always return 0.
In calibration files, the signal description ‘*’ is treated as a wildcard entry that will match any signal with the specified units.
When reading a multi-frequency record using getvec()
or sample()
,
the resampled values will be correctly rounded to the nearest integer, and will
be calculated correctly for large numbers of samples per frame.
The Fortran wrapper functions have improved support for working with “native
Fortran” string data (when FIXSTRINGS
is defined), allowing Fortran
programs to work with strings containing embedded spaces. These functions will
now avoid buffer overflows, both with and without FIXSTRINGS
.
The macros SALLOC
, SUALLOC
, SREALLOC
, SSTRCPY
, and
MEMERR
will avoid evaluating their arguments more than once (except for
the pointer argument.) These macros will now handle zero-byte allocations
consistently, and will check for integer overflows.
osigopen()
permits the siarray argument to be NULL
(like
isigopen()
.)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A number of corner cases have been fixed in getframe()
. It now
correctly handles skewed signals in variable-layout records, records with
multiple signal files, and records with signal file prologs. It also correctly
handles multi-segment records with signal file prologs, and multi-segment
records where some signal files are missing. The wfdbgetskew()
and
wfdbsetiskew()
functions now work as documented.
Functions for reading header, calibration, and info files will now correctly handle lines of any length, rather than being limited to 255 or 126 characters per line.
In the WFDB path, colons can be used within the “authority” portion of a URL, in order to designate a port number (‘http://example.org:8080/’), an IPv6 address (‘http://[::1]/’), or a password (‘http://x:y@example.org/’). Colons that appear after the third slash in a URL are treated as path separators, as usual.
Many library functions accept an argument that is a pointer to a string, array,
or structure of some kind. If the object pointed to is not modified, the
argument is now declared with the const
qualifier.
Previously, the putvec()
function would sometimes modify the array
provided by the caller; now, the array is never modified.
The sample()
function will return correct results when samples are
retrieved in random order. Previously, if the caller requested sample 1,
followed by sample 5000, followed by sample 2, sample()
would return
sample 1, followed by sample 4998, followed by sample 5001.
A multi-segment record in which the first segment has non-zero length, but the first segment header file is missing length or checksum fields, is now handled correctly as a fixed-layout record.
setgvmode()
will handle WFDB_GVPAD
, as documented; this was
broken in WFDB library versions 10.5.3 through 10.6.2.
getwfdb()
will no longer add or modify existing environment variables.
In previous versions of the library, the first time getwfdb()
was
called, it would set the WFDB
, WFDBCAL
, WFDBANNSORT
, and
WFDBGVMODE
environment variables, if these variables were not already
defined.
setwfdb()
will correctly handle indirect paths (e.g., ‘@file’).
timstr()
or mstimstr()
would, in some cases, return an incorrect
date following a call to setbasetime()
or datstr()
. This has
been fixed.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
PhysioNet (wfdb@physionet.org)