Hi, I remember seeing some reference to Handmade Hero Day 021, for reloading DLLs to achieve live coding. I've been able to have a demo done for SDL graphics using the technique. The code is here - I've also created a demo video here
While attempting a similar program for audio, I've run into an issue on Mac and Windows - I get a crash - apologies, I have not debugged it much. But it works fine on Linux - code is here I find it extremely exciting to be able to update the audio render function on the fly in a running program - in the above code, I have to logic to recompile the DLL code each time the DLL source file changes :)
I am sharing this for a couple of reasons - one maybe someone gets as excited about it, and two maybe someone will help with the issue on mac :)
Regards, Kashyap
I haven't tried running your code, but have you tested that you can unload the .DLL at all on Mac and Windows?
And if that works, can you get it to reload even once? (e.g. instead of a loop do something like "press a key to reload").
On windows and Mac, what I noticed is that the program sdl_audio_callback.nim from sd2 examples crashes when it is compiled with --threads:on
I suspect there is some race condition that is not dealt with appropriately.