Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update wav size info when I generating a wav file? #245

Closed
maxxfire opened this issue Oct 18, 2022 · 2 comments
Closed

How to update wav size info when I generating a wav file? #245

maxxfire opened this issue Oct 18, 2022 · 2 comments

Comments

@maxxfire
Copy link

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.

@maxxfire
Copy link
Author

It just like sync/flush data size to the wav file.

@mackron
Copy link
Owner

mackron commented Oct 18, 2022

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): #211.

(Moving to the discussion section.)

Repository owner locked and limited conversation to collaborators Oct 18, 2022
@mackron mackron converted this issue into discussion #246 Oct 18, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants