SHARE
TWEET

Untitled

a guest Oct 21st, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.   ==============================================================================
  3.  
  4.     This file was auto-generated!
  5.  
  6.   ==============================================================================
  7. */
  8.  
  9. #pragma once
  10.  
  11. #include "../JuceLibraryCode/JuceHeader.h"
  12.  
  13. //==============================================================================
  14. /*
  15.     This component lives inside our window, and this is where you should put all
  16.     your controls and content.
  17. */
  18. class MainComponent   : public AudioAppComponent
  19. {
  20. public:
  21.     //==============================================================================
  22.     MainComponent();
  23.     ~MainComponent();
  24.  
  25.     //==============================================================================
  26.     void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
  27.     void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
  28.     void releaseResources() override;
  29.  
  30.     //==============================================================================
  31.     void paint (Graphics& g) override;
  32.     void resized() override;
  33.  
  34. private:
  35.     //==============================================================================
  36.     // Your private member variables go here...
  37.  
  38.     int width, height;
  39.     float playerSampleRate;
  40.     int playerBlockSize;
  41.  
  42.  
  43.     enum transportState {STOPPED, PLAYING};
  44.     transportState state;
  45.     void stateChanged(transportState newState);
  46.  
  47.     void openButtonClicked();
  48.     TextButton openButton;
  49.  
  50.     void playButtonClicked();
  51.     TextButton playButton;
  52.  
  53.     void stopButtonClicked();
  54.     TextButton stopButton;
  55.  
  56.     AudioFormatManager formatManager;
  57.     AudioTransportSource transport;
  58.     //AudioFormatReaderSource* audioSource;
  59.     std::unique_ptr<AudioFormatReaderSource> audioSource;
  60.     AudioFormatReader* reader;
  61.     //std::unique_ptr<AudioFormatReader> reader;
  62.  
  63.  
  64.    
  65.  
  66.  
  67.     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
  68. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top