Closed ell1e closed 2 years ago
Okay, I think the conflict merge should have worked. Runs again in local test.
Additional note: this also implements this suggestion to remove the outputSamples allocation entirely, such that the render functions can remain void
with no need to report allocation failure.
Thanks a lot for all the work on this PR!
After the merge I did some basic C89 fixes so it compiles in MSVC 6.0 again as well as some style cleanup - I hope you don't mind.
If you could look through that change e86d986 I'd be grateful. I fixed the if in tsf_load_samples
and added cleanup in tsf_load_presets
if malloc starts failing midway through. I think this covers all cases?
Nice catch regarding the cleanup in tsf_load_presets
I missed! The changes look good, I also like the configurable render size a lot. Cool to see this fix go in so fast :+1:
This is my first shot at making sure TSF_MALLOC and TSF_REALLOC are being checked for allocation failure. Some functions return
int
instead ofvoid
now, to pass on the resulting allocation failure. This is not very well tested, at least not for actual out of memory cases. I'll need to think about how to test this best.Fixes #61