Attempt implementing seek while frozen, doesn't work too well like this...Don't use opengl stuff at all if the opengl module isn't set available.

This commit is contained in:
xenakios
2018-04-02 20:07:55 +03:00
parent ce30e2afd9
commit 890c568155
5 changed files with 25 additions and 8 deletions

View File

@ -505,8 +505,10 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu()
WaveformComponent::WaveformComponent(AudioFormatManager* afm, AudioThumbnail* thumb)
{
TimeSelectionChangedCallback = [](Range<double>, int) {};
#ifdef JUCE_MODULE_AVAILABLE_juce_opengl
if (m_use_opengl == true)
m_ogl.attachTo(*this);
#endif
m_thumbnail = thumb;
m_thumbnail->addChangeListener(this);
setOpaque(true);
@ -514,8 +516,10 @@ WaveformComponent::WaveformComponent(AudioFormatManager* afm, AudioThumbnail* th
WaveformComponent::~WaveformComponent()
{
#ifdef JUCE_MODULE_AVAILABLE_juce_opengl
if (m_use_opengl == true)
m_ogl.detach();
#endif
m_thumbnail->removeChangeListener(this);
}