2014-11-12 21:55:11 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <queue>
|
|
|
|
|
|
|
|
#include "ScopeContext.h"
|
|
|
|
#include "fftw3.h"
|
|
|
|
|
|
|
|
class ScopeCanvas: public wxGLCanvas {
|
|
|
|
public:
|
2014-11-16 19:14:15 -05:00
|
|
|
std::vector<float> waveform_points;
|
|
|
|
|
2014-11-12 21:55:11 -05:00
|
|
|
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
|
|
|
|
~ScopeCanvas();
|
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
void setWaveformPoints(std::vector<float> &waveform_points_in);
|
2014-12-29 00:24:10 -05:00
|
|
|
void setStereo(bool state);
|
2014-12-31 21:31:37 -05:00
|
|
|
void setDeviceName(std::string device_name);
|
2014-11-12 21:55:11 -05:00
|
|
|
private:
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
|
|
|
void OnIdle(wxIdleEvent &event);
|
|
|
|
|
|
|
|
wxWindow *parent;
|
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
ScopeContext *glContext;
|
2014-12-31 21:31:37 -05:00
|
|
|
std::string deviceName;
|
2014-12-29 00:24:10 -05:00
|
|
|
bool stereo;
|
2014-11-15 23:41:41 -05:00
|
|
|
// event table
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
2014-11-12 21:55:11 -05:00
|
|
|
};
|
|
|
|
|