Checking the number of readable records assumes 16-bit-encoded samples, i.e. an EDF file. However, when reading BDF files, which have 24-bit samples, the computed number of readable records is incorrect and the discrepancy goes unnoticed so we hit an EOFError. This can be fixed by checking the size of the sample type rather than assuming it's 2.
Checking the number of readable records assumes 16-bit-encoded samples, i.e. an EDF file. However, when reading BDF files, which have 24-bit samples, the computed number of readable records is incorrect and the discrepancy goes unnoticed so we hit an
EOFError
. This can be fixed by checking the size of the sample type rather than assuming it's 2.