diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 78891a5..4ba725c 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -55,6 +55,13 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau m_settings_button.setButtonText("Settings..."); m_settings_button.onClick = [this]() { showSettingsMenu(); }; + if (processor.wrapperType == AudioProcessor::wrapperType_Standalone) + { + addAndMakeVisible(&m_render_button); + m_render_button.setButtonText("Render..."); + m_render_button.onClick = [this]() { showRenderDialog(); }; + } + addAndMakeVisible(&m_info_label); m_info_label.setJustificationType(Justification::centredRight); @@ -237,6 +244,10 @@ PaulstretchpluginAudioProcessorEditor::~PaulstretchpluginAudioProcessorEditor() { } +void PaulstretchpluginAudioProcessorEditor::showRenderDialog() +{ +} + void PaulstretchpluginAudioProcessorEditor::paint (Graphics& g) { g.fillAll(Colours::darkgrey); @@ -248,12 +259,19 @@ void PaulstretchpluginAudioProcessorEditor::resized() m_import_button.changeWidthToFitText(); m_settings_button.setBounds(m_import_button.getRight() + 1, 1, 60, 24); m_settings_button.changeWidthToFitText(); - m_perfmeter.setBounds(m_settings_button.getRight() + 1, 1, 150, 24); + int yoffs = m_settings_button.getRight() + 1; + if (processor.wrapperType == AudioProcessor::wrapperType_Standalone) + { + m_render_button.setBounds(yoffs, 1, 60, 24); + m_render_button.changeWidthToFitText(); + yoffs = m_render_button.getRight() + 1; + } + m_perfmeter.setBounds(yoffs, 1, 150, 24); m_info_label.setBounds(m_perfmeter.getRight() + 1, m_settings_button.getY(), getWidth()- m_perfmeter.getRight()-1, 24); int w = getWidth(); int xoffs = 1; - int yoffs = 30; + yoffs = 30; int div = w / 5; //std::vector> layout; //layout.emplace_back(cpi_capture_enabled, cpi_passthrough, cpi_pause_enabled, cpi_freeze); @@ -490,16 +508,12 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu() for (int i=0;i= 200 && r < 210) { @@ -557,18 +571,7 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu() toggleBool(processor.m_show_technical_info); processor.m_propsfile->m_props_file->setValue("showtechnicalinfo", processor.m_show_technical_info); } - if (r == 8) - { -#ifdef JUCE_WINDOWS - processor.offlineRender(File("C:\\MusicAudio\\sourcesamples\\paultesmaus\\plugin_offline_test\\out.wav")); -#else - processor.offlineRender(File("/Users/teemu/AudioProjects/sourcesamples/paultests/pspout.wav")); -#endif - } - if (r == 9) - { - processor.m_offline_render_cancel_requested = true; - } + } WaveformComponent::WaveformComponent(AudioFormatManager* afm, AudioThumbnail* thumb) diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index 61bb6c7..80ba018 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -241,6 +241,7 @@ public: WaveformComponent m_wavecomponent; void chooseFile(); + void showRenderDialog(); private: PaulstretchpluginAudioProcessor& processor; uptrvec m_parcomps; @@ -248,6 +249,7 @@ private: PerfMeterComponent m_perfmeter; TextButton m_import_button; TextButton m_settings_button; + TextButton m_render_button; Label m_info_label; SpectralChainEditor m_spec_order_ed;