Closed arryon closed 7 years ago
That would seem like a logical step. However the newfile flag is used to indicate the processing of a new file. Last is only used for the last chunk and is sent after fully processing the last file. Normally when a newfile is started the buffers don't contain info that can be meaningfully used (merged) and therefore whatever is still in the buffers is simply discarded on arrival of a chunk with Continuity newfile.
So I am afraid this proposed change is not correct.
The last data read from the wav-file can be shorter than normal and can and will be published like that. If you want a special end-of-file continuity type it should probably be a subtype of withprevious.
When the wav input processor cannot read a full chunk, this means that the end of the file has been reached. In this case, mark the continuity as 'last'.