wfdb
wfdb copied to clipboard
WFDB invalid sample for format 24 and 32
Currently invalid samples for <16 bit precision formats are interpreted to be equal to the minimum value stored by the format. These invalid samples are then converted to the constant WFDB_INVALID_SAMPLE defined in wfdb.h which is equal to -32768.
For formats with >=16 bit precision, including 24 and 32, there is no conversion. This means that fmts 24 and 32 currently cannot store actual values of -32768 and must store their invalid samples as that number as well.
Potentially in the next wfdb major release, WFDB_INVALID_SAMPLE should be redefined as 2^-31 instead.