do offline render regardless of pause state

This commit is contained in:
essej 2022-04-12 19:20:28 -04:00
parent 38cf79fec0
commit e2178da076
2 changed files with 6 additions and 2 deletions

View File

@ -2145,7 +2145,7 @@ void FreeFilterComponent::updateParameterComponents()
} }
ParameterGroupComponent::ParameterGroupComponent(const String & name_, int groupid, PaulstretchpluginAudioProcessor* proc, bool showtoggle) ParameterGroupComponent::ParameterGroupComponent(const String & name_, int groupid, PaulstretchpluginAudioProcessor* proc, bool showtoggle)
:name(name_), groupId(groupid), m_proc(proc), m_bgcolor(0xff1a1a1a), m_selbgcolor(0xff0d1922) :name(name_), groupId(groupid), m_proc(proc), m_bgcolor(0xff1a1a1a), m_selbgcolor(0xff141f28)
{ {
if (name_.isNotEmpty()) { if (name_.isNotEmpty()) {
m_namelabel = std::make_unique<Label>("name", name); m_namelabel = std::make_unique<Label>("name", name);
@ -2304,6 +2304,7 @@ void ParameterGroupComponent::updateParameterComponents()
if (order[i].m_index == groupId) { if (order[i].m_index == groupId) {
enabled = order[i].m_enabled->get(); enabled = order[i].m_enabled->get();
m_enableButton->setToggleState(enabled, dontSendNotification); m_enableButton->setToggleState(enabled, dontSendNotification);
m_enableButton->setAlpha(enabled ? 1.0f : 0.75f);
break; break;
} }
} }

View File

@ -568,7 +568,8 @@ String PaulstretchpluginAudioProcessor::offlineRender(OfflineRenderParams render
auto processor = std::make_shared<PaulstretchpluginAudioProcessor>(true); auto processor = std::make_shared<PaulstretchpluginAudioProcessor>(true);
processor->setNonRealtime(true); processor->setNonRealtime(true);
processor->setStateFromTree(state); processor->setStateFromTree(state);
double outsr{ renderpars.outsr };
double outsr{ renderpars.outsr };
if (outsr < 10.0) { if (outsr < 10.0) {
outsr = processor->getStretchSource()->getInfileSamplerate(); outsr = processor->getStretchSource()->getInfileSamplerate();
if (outsr < 10.0) if (outsr < 10.0)
@ -584,6 +585,8 @@ String PaulstretchpluginAudioProcessor::offlineRender(OfflineRenderParams render
sanitizeTimeRange(t0, t1); sanitizeTimeRange(t0, t1);
sc->setPlayRange({ t0,t1 }); sc->setPlayRange({ t0,t1 });
*(processor->getBoolParameter(cpi_pause_enabled)) = false;
sc->setMainVolume(*processor->getFloatParameter(cpi_main_volume)); sc->setMainVolume(*processor->getFloatParameter(cpi_main_volume));
sc->setRate(*processor->getFloatParameter(cpi_stretchamount)); sc->setRate(*processor->getFloatParameter(cpi_stretchamount));
sc->setDryPlayrate(*processor->getFloatParameter(cpi_dryplayrate)); sc->setDryPlayrate(*processor->getFloatParameter(cpi_dryplayrate));