kopia lustrzana https://github.com/jameshball/osci-render
Detect crashes or broken project files
rodzic
cdf3e88e17
commit
edff0e529e
|
@ -86,6 +86,7 @@ void CommonAudioProcessor::addAllParameters() {
|
||||||
|
|
||||||
CommonAudioProcessor::~CommonAudioProcessor()
|
CommonAudioProcessor::~CommonAudioProcessor()
|
||||||
{
|
{
|
||||||
|
setGlobalValue("endTime", juce::Time::getCurrentTime().toISO8601(true));
|
||||||
saveGlobalSettings();
|
saveGlobalSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -709,6 +709,37 @@ void OscirenderAudioProcessor::getStateInformation(juce::MemoryBlock& destData)
|
||||||
}
|
}
|
||||||
|
|
||||||
void OscirenderAudioProcessor::setStateInformation(const void* data, int sizeInBytes) {
|
void OscirenderAudioProcessor::setStateInformation(const void* data, int sizeInBytes) {
|
||||||
|
// check that the previous end time is later than the start time.
|
||||||
|
// if not, the program did not close properly.
|
||||||
|
juce::String startTime = getGlobalStringValue("startTime");
|
||||||
|
juce::String endTime = getGlobalStringValue("endTime");
|
||||||
|
|
||||||
|
if (startTime.isNotEmpty() && endTime.isNotEmpty()) {
|
||||||
|
juce::Time start = juce::Time::fromISO8601(startTime);
|
||||||
|
juce::Time end = juce::Time::fromISO8601(endTime);
|
||||||
|
|
||||||
|
if ((start > end || end == juce::Time()) && juce::MessageManager::getInstance()->isThisTheMessageThread()) {
|
||||||
|
juce::String message = "It appears that " + juce::String(ProjectInfo::projectName) + " did not close properly during your last session. This may indicate a problem with your project or session.";
|
||||||
|
|
||||||
|
// Use a synchronous dialog to ensure user makes a choice before proceeding
|
||||||
|
bool userPressedReset = juce::AlertWindow::showOkCancelBox(
|
||||||
|
juce::AlertWindow::WarningIcon,
|
||||||
|
"Possible Crash Detected",
|
||||||
|
message + "\n\nDo you want to reset to a new project, or continue loading your previous session?",
|
||||||
|
"Reset to New Project",
|
||||||
|
"Continue",
|
||||||
|
nullptr,
|
||||||
|
nullptr
|
||||||
|
);
|
||||||
|
|
||||||
|
if (userPressedReset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setGlobalValue("startTime", juce::Time::getCurrentTime().toISO8601(true));
|
||||||
|
|
||||||
std::unique_ptr<juce::XmlElement> xml;
|
std::unique_ptr<juce::XmlElement> xml;
|
||||||
|
|
||||||
const uint32_t magicXmlNumber = 0x21324356;
|
const uint32_t magicXmlNumber = 0x21324356;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
|
||||||
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
cppLanguageStandard="20" projectLineFeed=" " headerPath="./include"
|
||||||
version="2.4.11.1" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
version="2.4.11.1" companyName="James H Ball" companyWebsite="https://osci-render.com"
|
||||||
companyEmail="james@ball.sh" defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1"
|
companyEmail="james@ball.sh" defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
||||||
pluginAUMainType="'aumf'">
|
pluginAUMainType="'aumf'">
|
||||||
<MAINGROUP id="j5Ge2T" name="osci-render">
|
<MAINGROUP id="j5Ge2T" name="osci-render">
|
||||||
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
|
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
aaxIdentifier="sh.ball.sosci" cppLanguageStandard="20" projectLineFeed=" "
|
aaxIdentifier="sh.ball.sosci" cppLanguageStandard="20" projectLineFeed=" "
|
||||||
headerPath="./include" version="1.1.5.1" companyName="James H Ball"
|
headerPath="./include" version="1.1.5.1" companyName="James H Ball"
|
||||||
companyWebsite="https://osci-render.com" companyEmail="james@ball.sh"
|
companyWebsite="https://osci-render.com" companyEmail="james@ball.sh"
|
||||||
defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1"
|
defines="NOMINMAX=1 INTERNET_FLAG_NO_AUTO_REDIRECT=0 SOSCI_FEATURES=1 JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 JUCE_MODAL_LOOPS_PERMITTED=1"
|
||||||
pluginManufacturerCode="Jhba" pluginCode="Sosc" pluginAUMainType="'aufx'">
|
pluginManufacturerCode="Jhba" pluginCode="Sosc" pluginAUMainType="'aufx'">
|
||||||
<MAINGROUP id="j5Ge2T" name="sosci">
|
<MAINGROUP id="j5Ge2T" name="sosci">
|
||||||
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
|
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
|
||||||
|
|
Ładowanie…
Reference in New Issue