mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-22 19:58:39 -05:00
Re-connect scope to demodulator output data
This commit is contained in:
parent
1950c3109a
commit
82b6b67f3c
@ -165,6 +165,16 @@ void AppFrame::OnDemodInput(wxThreadEvent& event) {
|
||||
AudioThreadTask task = AudioThreadTask(AudioThreadTask::AUDIO_THREAD_DATA);
|
||||
task.setData(*new_buffer);
|
||||
threadQueueAudio->addTask(task, AudioThreadQueue::AUDIO_PRIORITY_HIGHEST);
|
||||
|
||||
if (scopeCanvas->waveform_points.size() != new_buffer->size() * 2) {
|
||||
scopeCanvas->waveform_points.resize(new_buffer->size() * 2);
|
||||
}
|
||||
|
||||
for (int i = 0, iMax = new_buffer->size(); i < iMax; i++) {
|
||||
scopeCanvas->waveform_points[i * 2 + 1] = (*new_buffer)[i] * 0.5f;
|
||||
scopeCanvas->waveform_points[i * 2] = ((double) i / (double) iMax);
|
||||
}
|
||||
|
||||
} else {
|
||||
std::cout << "Incoming Demod data empty?" << std::endl;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
class ScopeCanvas: public wxGLCanvas {
|
||||
public:
|
||||
std::vector<float> waveform_points;
|
||||
|
||||
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
|
||||
~ScopeCanvas();
|
||||
|
||||
@ -23,7 +25,6 @@ private:
|
||||
void OnIdle(wxIdleEvent &event);
|
||||
|
||||
wxWindow *parent;
|
||||
std::vector<float> waveform_points;
|
||||
|
||||
ScopeContext *glContext;
|
||||
// event table
|
||||
|
Loading…
Reference in New Issue
Block a user