Closed Show-vars closed 4 years ago
A block of memory needs to be available to store an entire FLAC frame, but a single FLAC frame can potentially be up to 2MB in size which is obviously too much to store statically in the structure. No memory allocations in any of the read functions are allowed, so that memory needs to be allocated up front at initialization time.
I have plans in place to make all dr_* libraries consistent in terms of API, but that heap allocation for FLAC will still be happening internally.
This is actually good news. Thank you so much!
It would be great if all awesome dr decoder libs has identical API for init, open, read and close operations. Why we can't initialize the flac from static memory without using malloc? Are there any technical limitations in this regard?