kopia lustrzana https://github.com/jameshball/osci-render
Save visualiser settings
rodzic
9726317928
commit
35c8f52d47
|
@ -809,6 +809,10 @@ void OscirenderAudioProcessor::getStateInformation(juce::MemoryBlock& destData)
|
||||||
fileXml->addTextElement(base64);
|
fileXml->addTextElement(base64);
|
||||||
}
|
}
|
||||||
xml->setAttribute("currentFile", currentFile);
|
xml->setAttribute("currentFile", currentFile);
|
||||||
|
|
||||||
|
auto visualiserXml = xml->createNewChildElement("visualiser");
|
||||||
|
visualiserXml->setAttribute("roughness", roughness);
|
||||||
|
visualiserXml->setAttribute("intensity", intensity);
|
||||||
|
|
||||||
copyXmlToBinary(*xml, destData);
|
copyXmlToBinary(*xml, destData);
|
||||||
}
|
}
|
||||||
|
@ -923,6 +927,12 @@ void OscirenderAudioProcessor::setStateInformation(const void* data, int sizeInB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
changeCurrentFile(xml->getIntAttribute("currentFile", -1));
|
changeCurrentFile(xml->getIntAttribute("currentFile", -1));
|
||||||
|
|
||||||
|
auto visualiserXml = xml->getChildByName("visualiser");
|
||||||
|
if (visualiserXml != nullptr) {
|
||||||
|
roughness = visualiserXml->getIntAttribute("roughness");
|
||||||
|
intensity = visualiserXml->getDoubleAttribute("intensity");
|
||||||
|
}
|
||||||
|
|
||||||
broadcaster.sendChangeMessage();
|
broadcaster.sendChangeMessage();
|
||||||
prevMidiEnabled = !midiEnabled->getBoolValue();
|
prevMidiEnabled = !midiEnabled->getBoolValue();
|
||||||
|
|
|
@ -76,6 +76,9 @@ public:
|
||||||
int VERSION_HINT = 2;
|
int VERSION_HINT = 2;
|
||||||
|
|
||||||
std::atomic<double> currentSampleRate = 0.0;
|
std::atomic<double> currentSampleRate = 0.0;
|
||||||
|
|
||||||
|
std::atomic<int> roughness = 4;
|
||||||
|
std::atomic<double> intensity = 1.0;
|
||||||
|
|
||||||
juce::SpinLock effectsLock;
|
juce::SpinLock effectsLock;
|
||||||
std::vector<std::shared_ptr<Effect>> toggleableEffects;
|
std::vector<std::shared_ptr<Effect>> toggleableEffects;
|
||||||
|
|
|
@ -8,8 +8,14 @@ VisualiserComponent::VisualiserComponent(int numChannels, OscirenderAudioProcess
|
||||||
|
|
||||||
setFullScreen(false);
|
setFullScreen(false);
|
||||||
|
|
||||||
roughness.textBox.setValue(4);
|
roughness.textBox.setValue(audioProcessor.roughness);
|
||||||
intensity.textBox.setValue(1.0);
|
roughness.textBox.onValueChange = [this]() {
|
||||||
|
audioProcessor.roughness = (int) roughness.textBox.getValue();
|
||||||
|
};
|
||||||
|
intensity.textBox.setValue(audioProcessor.intensity);
|
||||||
|
intensity.textBox.onValueChange = [this]() {
|
||||||
|
audioProcessor.intensity = intensity.textBox.getValue();
|
||||||
|
};
|
||||||
|
|
||||||
setMouseCursor(juce::MouseCursor::PointingHandCursor);
|
setMouseCursor(juce::MouseCursor::PointingHandCursor);
|
||||||
setWantsKeyboardFocus(true);
|
setWantsKeyboardFocus(true);
|
||||||
|
|
Ładowanie…
Reference in New Issue