Oscilloscope 0.5.0
A simple oscilloscope VST
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
OscilloscopeComponent Class Referenceabstract

#include <OscilloscopeComponent.h>

Inheritance diagram for OscilloscopeComponent:
TriggeredOscilloscope UntriggeredOscilloscope

Public Member Functions

 OscilloscopeComponent (OscilloscopeAudioProcessor &aProcessor, int sampleRate, int framesPerSecond)
 
 ~OscilloscopeComponent ()
 
void setFramesPerSecond (int framesPerSecond)
 
void drawGrid (juce::Graphics &g, float w, float h)
 
void paint (juce::Graphics &g) override
 
void resized () override
 

Protected Attributes

int sampleRate
 
std::vector< float > sampleData
 
OscilloscopeAudioProcessoraudioProcessor
 

Detailed Description

Oscilloscope graphical component.

Inherits from JUCE Component and JUCE timer

Definition at line 23 of file OscilloscopeComponent.h.

Constructor & Destructor Documentation

◆ OscilloscopeComponent()

OscilloscopeComponent::OscilloscopeComponent ( OscilloscopeAudioProcessor aProcessor,
int  sampleRate,
int  framesPerSecond 
)

Constructor.

Parameters
queueToUseAudioBufferQueue to use

Definition at line 13 of file OscilloscopeComponent.cpp.

◆ ~OscilloscopeComponent()

OscilloscopeComponent::~OscilloscopeComponent ( )

Destroy the Oscilloscope Component object.

Definition at line 44 of file OscilloscopeComponent.cpp.

Member Function Documentation

◆ drawGrid()

void OscilloscopeComponent::drawGrid ( juce::Graphics &  g,
float  w,
float  h 
)

Draws oscilloscope's grid.

Parameters
gJUCE Graphics .
wwidth.
hheigth.

Definition at line 57 of file OscilloscopeComponent.cpp.

◆ paint()

void OscilloscopeComponent::paint ( juce::Graphics &  g)
override

Paints the component.

Parameters
gJUCE Graphics .

Definition at line 95 of file OscilloscopeComponent.cpp.

◆ resized()

void OscilloscopeComponent::resized ( )
override

Called when component is resized.

Definition at line 117 of file OscilloscopeComponent.cpp.

◆ setFramesPerSecond()

void OscilloscopeComponent::setFramesPerSecond ( int  framesPerSecond)

Sets frames per seconds.

Parameters
framesPerSecondFrames per second

Definition at line 50 of file OscilloscopeComponent.cpp.

Member Data Documentation

◆ audioProcessor

OscilloscopeAudioProcessor& OscilloscopeComponent::audioProcessor
protected

Definition at line 76 of file OscilloscopeComponent.h.

◆ sampleData

std::vector<float> OscilloscopeComponent::sampleData
protected

Data currently displayed

Definition at line 75 of file OscilloscopeComponent.h.

◆ sampleRate

int OscilloscopeComponent::sampleRate
protected

Sample rate

Definition at line 74 of file OscilloscopeComponent.h.


The documentation for this class was generated from the following files: