No$GBA only writes the save-file when the emulation process is properly ended; that means any progress is lost if the game crashes or No$GBA is terminated with the taskmanager.
The microphone wave-in failure is triggered by an unknown combination of hardware and software and no attempt to fix it for those who have it has yielded any lasting success.
What you can do to limit this error's effects is to get No$Zoomer. It has an option to write the save-file without exiting and another one to deactivate your mic.
This will prevent said error from happening, but you have to enable the mic (and risk the error) when you need it.
The microphone wave-in failure is triggered by an unknown combination of hardware and software and no attempt to fix it for those who have it has yielded any lasting success.
What you can do to limit this error's effects is to get No$Zoomer. It has an option to write the save-file without exiting and another one to deactivate your mic.
This will prevent said error from happening, but you have to enable the mic (and risk the error) when you need it.