2025-01-06 18:27:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "../CommonPluginProcessor.h"
|
|
|
|
#include "../wav/WavParser.h"
|
2025-04-24 12:53:44 +00:00
|
|
|
#include "TimelineComponent.h"
|
2025-01-06 18:27:23 +00:00
|
|
|
|
2025-04-24 12:53:44 +00:00
|
|
|
class AudioPlayerComponent : public TimelineComponent, public AudioPlayerListener
|
|
|
|
{
|
2025-01-06 18:27:23 +00:00
|
|
|
public:
|
|
|
|
AudioPlayerComponent(CommonAudioProcessor& processor);
|
|
|
|
~AudioPlayerComponent() override;
|
|
|
|
|
2025-04-24 12:53:44 +00:00
|
|
|
void setup() override;
|
2025-01-07 17:51:08 +00:00
|
|
|
void parserChanged() override;
|
2025-01-06 18:27:23 +00:00
|
|
|
void setPaused(bool paused);
|
2025-04-24 12:53:44 +00:00
|
|
|
bool isInitialised() const;
|
|
|
|
void hide();
|
|
|
|
void timerCallback() override;
|
2025-01-10 16:51:11 +00:00
|
|
|
|
|
|
|
std::function<void()> onParserChanged;
|
2025-01-06 18:27:23 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
CommonAudioProcessor& audioProcessor;
|
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AudioPlayerComponent)
|
|
|
|
JUCE_DECLARE_WEAK_REFERENCEABLE(AudioPlayerComponent)
|
|
|
|
};
|