Curtis L. Olson wrote:

> Frederic Bouvier wrote:
> >What is the right way to exit the main loop, rather than just calling
> >exit() ?
> >
> >If there is no other option, we need an atexit call.
> >
> >I put alutExit() before exit(), with a sample playing from a previous run
> >and the sound created by this instance are shut, the program stop as
> >expected and my crazy sample is still playing. Rebooting once again...
> >
> >
> Fred,
> I added an atexit() function to CVS that deletes the "global" class.
> This should then also delete the soundmgr class which will cause
> alutExit() to be called.
> This might also give us the opportunity to hook in the SDL cleanup
> function as well.

That works well, either by asking to exit in the menu, or closing the
window. Destroying the samples kill the sound, alutExit just cleaning
a quiet process.
I'll have to remember not to kill fg or interrupt a debugging session.


Flightgear-devel mailing list

Reply via email to