Commit 213bc9ae authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

provided a more robust way of suspending dsp before closing the patch... needs...

provided a more robust way of suspending dsp before closing the patch... needs testing to see if this fixes lingering sporadic crashes when quitting without closing the patch.
parent 2b109dfb
......@@ -1419,17 +1419,19 @@ static void canvas_stop_dsp(void)
/* DSP can be suspended before, and resumed after, operations which
might affect the DSP chain. For example, we suspend before loading and
resume afterward, so that DSP doesn't get resorted for every DSP object
int the patch. */
in the patch. */
int canvas_suspend_dsp(void)
{
int rval = canvas_dspstate;
//fprintf(stderr,"canvas_suspend_dsp %d\n", rval);
if (rval) canvas_stop_dsp();
return (rval);
}
void canvas_resume_dsp(int oldstate)
{
//fprintf(stderr,"canvas_resume_dsp %d\n", oldstate);
if (oldstate) canvas_start_dsp();
}
......
......@@ -1324,6 +1324,7 @@ void glob_quit(void *dummy)
//let's try to cleanly remove invisible template canvases
//if (garray_arraytemplatecanvas) canvas_free( (t_canvas *)garray_arraytemplatecanvas);
//if (garray_floattemplatecanvas) canvas_free( (t_canvas *)garray_floattemplatecanvas);
canvas_suspend_dsp();
glob_closeall(0, 1);
sys_vgui("exit\n");
if (!sys_nogui)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment