Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ==============================================================================
- This file was auto-generated!
- ==============================================================================
- */
- #pragma once
- #include "../JuceLibraryCode/JuceHeader.h"
- //==============================================================================
- /*
- This component lives inside our window, and this is where you should put all
- your controls and content.
- */
- class MainComponent : public AudioAppComponent
- {
- public:
- //==============================================================================
- MainComponent();
- ~MainComponent();
- //==============================================================================
- void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
- void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
- void releaseResources() override;
- //==============================================================================
- void paint (Graphics& g) override;
- void resized() override;
- private:
- //==============================================================================
- // Your private member variables go here...
- int width, height;
- float playerSampleRate;
- int playerBlockSize;
- enum transportState {STOPPED, PLAYING};
- transportState state;
- void stateChanged(transportState newState);
- void openButtonClicked();
- TextButton openButton;
- void playButtonClicked();
- TextButton playButton;
- void stopButtonClicked();
- TextButton stopButton;
- AudioFormatManager formatManager;
- AudioTransportSource transport;
- //AudioFormatReaderSource* audioSource;
- std::unique_ptr<AudioFormatReaderSource> audioSource;
- AudioFormatReader* reader;
- //std::unique_ptr<AudioFormatReader> reader;
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement