TapeScope.h (826B)
1 #ifndef TAPESCOPE_H_INCLUDED 2 #define TAPESCOPE_H_INCLUDED 3 4 #include <JuceHeader.h> 5 6 class TapeScope : public foleys::MagicOscilloscope 7 { 8 public: 9 TapeScope() = default; 10 ~TapeScope() override = default; 11 12 enum AudioType 13 { 14 Input, 15 Output, 16 }; 17 18 void setNumChannels (int newNumChannels); 19 void prepareToPlay (double sampleRate, int samplesPerBlockExpected) override; 20 void pushSamplesIO (const AudioBuffer<float>& buffer, AudioType type); 21 22 void createPlotPaths (Path& path, Path& filledPath, Rectangle<float> bounds, foleys::MagicPlotComponent& component) override; 23 24 private: 25 foleys::MagicLevelSource inputSource; 26 foleys::MagicLevelSource outputSource; 27 28 int numChannels = 0; 29 30 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TapeScope) 31 }; 32 33 #endif // TAPESCOPE_H_INCLUDED