Prevent usage of incomplete audio blocks
Currently we only check if the audio block exists with os.path.exists
. This works fine for files that are older, but if we check a audio block which is being written to at that moment, we would assume that this block is ready. Although it is not because it is still growing. A solution would be to check the audio length of each audio block.
This might not work because the length is written continuously. For example if the engine-recorder was started at the 01.01.2023 at 00:00:00 and we have a audio block length of 30 seconds the check for a block at 01.01.2023 06:00:00 would return a length of 06:30:00!
Edited by Ole Binder