juce_dspmod_distortion_sample's People
juce_dspmod_distortion_sample's Issues
バグ:何も音を入力しないでGUIを表示するとGUIがフリーズする
pluginProcessorのインスタンス立ち上げてから、何も音を入力しないでGUIを表示すると、pluginEditorのtimerCallback()内で、Atomic型をgetする処理で固まってる。
void StaticClipperVstAudioProcessorEditor::timerCallback() {
for (int i = 0; i < Parameters::TotalNumParams; i++) {
float newVal = processor.parameters[i]->get();
parameterSliders[i].setValue(newVal, dontSendNotification);
}
// ここで固まる
reductionSlider[0].setValue(processor.leftReductionPercent.get(), dontSendNotification);
reductionSlider[1].setValue(processor.rightReductionPercent.get(), dontSendNotification);
}
現象の特定として、何も音を入力しないと、leftReduction とrightReduction の値を求める際にpreAverageが0.00になり、値が無限大になってしまうことが原因かもしれない。
leftReduction に適当な値を代入すると、GUIは固まらない
void StaticClipperVstAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
~~~
// 0を代入するとバグが発生しない
//
auto leftReduction = (preAverage.get(0) - postAverage.get(0)) / preAverage.get(0);
auto rightReduction = (preAverage.get(1) - postAverage.get(1)) / preAverage.get(1);
leftReductionPercent.set(leftReduction * 100.f);
rightReductionPercent.set(rightReduction * 100.f);
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.