From 1ceefd9d13e6713870d6cb3ea77ffcc2138f7293 Mon Sep 17 00:00:00 2001 From: George Reales Date: Sun, 1 Sep 2019 19:02:11 +0200 Subject: [PATCH] Fixed unsorted bank files. --- Source/PluginEditor.cpp | 8 ++++---- Source/PluginProcessor.cpp | 12 ++++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 8615fba..1966239 100755 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -499,7 +499,7 @@ void ObxdAudioProcessorEditor::sliderValueChanged (Slider* c) handleSParam(lfoAmt1Knob,LFO1AMT) handleSParam(lfoAmt2Knob,LFO2AMT) - handleSParam(pan1Knob,PAN1) + handleSParam(pan1Knob,PAN1) handleSParam(pan2Knob,PAN2) handleSParam(pan3Knob,PAN3) handleSParam(pan4Knob,PAN4) @@ -645,7 +645,7 @@ void ObxdAudioProcessorEditor::mouseUp(const MouseEvent& e) DirectoryIterator it(getFilter()->getSkinFolder(), false, "*", File::findDirectories); while (it.next()) { - skins.addUsingDefaultSort(it.getFile());r + skins.addUsingDefaultSort(it.getFile()); } for (int i = 0; i < skins.size(); ++i) @@ -659,8 +659,8 @@ void ObxdAudioProcessorEditor::mouseUp(const MouseEvent& e) int bankStart = 1000; { - const String currentBank = getFilter()->getCurrentBankFile().getFileName(); - + const String currentBank = getFilter()->getCurrentBankFile().getFileName(); + for (int i = 0; i < banks.size(); ++i) { const File bank = banks.getUnchecked(i); diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index b22f670..cba424f 100755 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -491,7 +491,7 @@ const String ObxdAudioProcessor::getParameterName (int index) case FREL: return S("FilterRelease"); } - return {}; + return {}; } const String ObxdAudioProcessor::getParameterText (int index) @@ -752,7 +752,7 @@ void ObxdAudioProcessor::getStateInformation (MemoryBlock& destData) copyXmlToBinary(xmlState,destData); } -/* + void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes) { if (XmlElement* const xmlState = getXmlFromBinary(data,sizeInBytes)) @@ -782,6 +782,8 @@ void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes) } setCurrentProgram(xmlState->getIntAttribute(S("currentProgram"), 0)); + + delete xmlState; } } @@ -799,9 +801,11 @@ void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int programs.currentProgramPtr->name = e->getStringAttribute(S("programName"), S("Default")); setCurrentProgram(programs.currentProgram); + + delete e; } } -*/ + void ObxdAudioProcessor::getCurrentProgramStateInformation(MemoryBlock& destData) { XmlElement xmlState = XmlElement("Datsounds"); @@ -941,7 +945,7 @@ void ObxdAudioProcessor::scanAndUpdateBanks() DirectoryIterator it(getBanksFolder(), false, "*.fxb", File::findFiles); while (it.next()) { - bankFiles.addUsingDefaultSort(it.getFile()); + bankFiles.addUsingDefaultSort(it.getFile()); } }