Initial work to add an audio file preview component for the audio file open dialog

This commit is contained in:
xenakios 2018-09-26 18:55:58 +03:00
parent dde24a89ed
commit ab76ba2987

View File

@ -21,6 +21,31 @@ www.gnu.org/licenses
#include <array> #include <array>
#include "RenderSettingsComponent.h" #include "RenderSettingsComponent.h"
class AudioFilePreviewComponent : public FilePreviewComponent
{
public:
AudioFilePreviewComponent(PaulstretchpluginAudioProcessor* p) : m_proc(p)
{
addAndMakeVisible(m_playbut);
m_playbut.setButtonText("Play");
m_playbut.onClick = [this]()
{
};
setSize(100, 30);
}
void selectedFileChanged(const File &newSelectedFile) override
{
}
void resized() override
{
m_playbut.setBounds(0, 0, getWidth(), getHeight());
}
private:
TextButton m_playbut;
PaulstretchpluginAudioProcessor* m_proc = nullptr;
};
//============================================================================== //==============================================================================
PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(PaulstretchpluginAudioProcessor& p) PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(PaulstretchpluginAudioProcessor& p)
: AudioProcessorEditor(&p), : AudioProcessorEditor(&p),