Closed maxxfire closed 2 years ago
It just like sync/flush data size to the wav file.
No, no there's no way to do that. You would have to detect the interruption and call drwav_close()
.
The writing functionality in dr_wav is only basic. It was never really intended on being a full featured and robust writer. I added it so I had a simple way of writing out audio data for testing purposes for my other audio work. However, I think the suggestion mentioned in this ticket addresses this particular issue so it might make it in at some point (no promises): https://github.com/mackron/dr_libs/issues/211.
(Moving to the discussion section.)
When I create and write to a wav file. Is there a way to update wav file size periodically? Because the upper level user may not invoke the drwav_close() at last. The writting process may interrupted at any time. And finally the wav size will not be correclty setted. So does there has a API which can update the wav size, for example: drwav_update_chunk_size(...), or something like that. Thanks.