Recover samples from an unfinished file #89
-
Hello, thank you for the work put into developing this library. I am using it to create a new MDF file and incrementally save samples to it, just like here. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I found a probable solution and created a pull request #91. Not sure if it's the best, but it sure works! |
Beta Was this translation helpful? Give feedback.
Thanks for finding and fix this bug in MDF 3 writers. This is actually a bug as your code change, so to say exists, in the MDF 4 writer SaveQueue() function.
Note that some loggers as from the CSS Electronics company, just append bytes at the end of the file without updating any of the internal counters. Instead the mark the file as unfinished in the initial ID block. This causes problems for most MDF readers as it appears not exist any samples.
The MDF 4 reader check this and finalize the files by updating the counters (it's many in MDF 4). There is a time penalty for doing this as you have to read the data block twice.