fix samples going away during audio export

issue #1387
This commit is contained in:
tildearrow 2023-08-19 18:52:08 -05:00
parent dba96812aa
commit 1dd02dd389
1 changed files with 5 additions and 0 deletions

View File

@ -824,6 +824,7 @@ void DivEngine::runExportThread() {
quitDispatch(); quitDispatch();
initDispatch(true); initDispatch(true);
renderSamples();
switch (exportMode) { switch (exportMode) {
case DIV_EXPORT_MODE_ONE: { case DIV_EXPORT_MODE_ONE: {
@ -837,6 +838,9 @@ void DivEngine::runExportThread() {
sf=sfWrap.doOpen(exportPath.c_str(),SFM_WRITE,&si); sf=sfWrap.doOpen(exportPath.c_str(),SFM_WRITE,&si);
if (sf==NULL) { if (sf==NULL) {
logE("could not open file for writing! (%s)",sf_strerror(NULL)); logE("could not open file for writing! (%s)",sf_strerror(NULL));
quitDispatch();
initDispatch(false);
renderSamples();
exporting=false; exporting=false;
return; return;
} }
@ -1151,6 +1155,7 @@ void DivEngine::runExportThread() {
quitDispatch(); quitDispatch();
initDispatch(false); initDispatch(false);
renderSamples();
stopExport=false; stopExport=false;
} }
#else #else