Fixed: When removing a row with embedded VST plugin, the Configuration Editor crashed.
Fixed: Analysis panel was not always working correctly when the loudness correction was active, especially on single-core systems. Fixed: Font of attribution in loudness correction GUI was too small.
This commit is contained in:
1 parent
a3cb12ff8a
commit
2997d2151c
4 files changed
+29
-9
No files matched your search
@@ -98,8 +98,10 @@
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>6</pointsize>
|
||||
<pointsize>7</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>true</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
||||
@@ -59,7 +59,7 @@ VSTPluginFilterGUI::~VSTPluginFilterGUI()
|
||||
{
|
||||
if (effect != NULL)
|
||||
{
|
||||
if (ui->embedAction->isChecked())
|
||||
if (embedded)
|
||||
on_embedAction_toggled(false);
|
||||
delete effect;
|
||||
effect = NULL;
|
||||
@@ -295,9 +295,9 @@ void VSTPluginFilterGUI::on_embedAction_toggled(bool checked)
|
||||
if (effect == NULL)
|
||||
enable = false;
|
||||
|
||||
bool wasEnabled = ui->frame->isVisible();
|
||||
if (enable != wasEnabled)
|
||||
if (enable != embedded)
|
||||
{
|
||||
embedded = enable;
|
||||
ui->frame->setVisible(enable);
|
||||
ui->statusLabel->setVisible(!enable);
|
||||
|
||||
@@ -310,6 +310,7 @@ void VSTPluginFilterGUI::on_embedAction_toggled(bool checked)
|
||||
}
|
||||
else
|
||||
{
|
||||
embedded = false;
|
||||
ui->frame->setVisible(false);
|
||||
ui->statusLabel->setVisible(true);
|
||||
|
||||
@@ -339,7 +340,7 @@ void VSTPluginFilterGUI::on_idle()
|
||||
{
|
||||
effect->doIdle();
|
||||
|
||||
if (ui->frame->isVisible() || autoApplyDialog)
|
||||
if (embedded || autoApplyDialog)
|
||||
{
|
||||
if (!lastReadTimer.isValid() || lastReadTimer.elapsed() > 1000)
|
||||
{
|
||||
@@ -361,7 +362,7 @@ void VSTPluginFilterGUI::on_idle()
|
||||
|
||||
void VSTPluginFilterGUI::onAutomate()
|
||||
{
|
||||
if (ui->frame->isVisible() || autoApplyDialog)
|
||||
if (embedded || autoApplyDialog)
|
||||
{
|
||||
effect->readFromEffect(chunkData, paramMap);
|
||||
updateModel();
|
||||
@@ -371,7 +372,7 @@ void VSTPluginFilterGUI::onAutomate()
|
||||
|
||||
void VSTPluginFilterGUI::onSizeWindow(int w, int h)
|
||||
{
|
||||
if (ui->frame->isVisible())
|
||||
if (embedded)
|
||||
ui->frame->setFixedSize(w, h);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ private:
|
||||
VSTPluginInstance* effect = NULL;
|
||||
std::wstring chunkData;
|
||||
std::unordered_map<std::wstring, float> paramMap;
|
||||
bool embedded = false;
|
||||
bool autoApplyDialog = false;
|
||||
QElapsedTimer lastReadTimer;
|
||||
};
|
||||
@@ -62,10 +62,26 @@ std::vector<std::wstring> LoudnessCorrectionFilter::initialize(float sampleRate,
|
||||
_highShelfBiquads.resize(_channelCount);
|
||||
_sampleRate = sampleRate;
|
||||
_attFactor = 1.0;
|
||||
_neutral = true;
|
||||
|
||||
double freqLS = 75, qLS = 1, gainLS = 0;
|
||||
double freqHS = 10000, qHS = 1, gainHS = 0;
|
||||
VolumeController VolumeController;
|
||||
float vol;
|
||||
HRESULT res = VolumeController.getVolume(vol);
|
||||
if (res == S_OK)
|
||||
{
|
||||
double preAmp;
|
||||
getLShelfParamter(vol, freqLS, qLS, gainLS, preAmp);
|
||||
_attFactor = exp(preAmp / 6 * log(2));
|
||||
getHShelfParamter(vol + (float)preAmp, freqHS, qHS, gainHS);
|
||||
_neutral = std::max<double>(std::abs(gainLS), std::abs(gainHS)) < 0.2 ? true : false;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < _channelCount; i++)
|
||||
{
|
||||
_lowShelfBiquads[i] = BiQuad(BiQuad::LOW_SHELF, 0, 75, _sampleRate, 1, false);
|
||||
_highShelfBiquads[i] = BiQuad(BiQuad::HIGH_SHELF, 0, 10000, _sampleRate, 1, false);
|
||||
_lowShelfBiquads[i] = BiQuad(BiQuad::LOW_SHELF, gainLS, freqLS, _sampleRate, qLS, false);
|
||||
_highShelfBiquads[i] = BiQuad(BiQuad::HIGH_SHELF, gainHS, freqHS, _sampleRate, qHS, false);
|
||||
}
|
||||
_stopParameterUpdateThreadEvent = CreateEvent(NULL, true, false, NULL);
|
||||
_parameterchangedEvent = CreateEvent(NULL, true, false, NULL);
|
||||
|
||||
Reference in new issue
Block a user