mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -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);
|
AudioThreadTask task = AudioThreadTask(AudioThreadTask::AUDIO_THREAD_DATA);
|
||||||
task.setData(*new_buffer);
|
task.setData(*new_buffer);
|
||||||
threadQueueAudio->addTask(task, AudioThreadQueue::AUDIO_PRIORITY_HIGHEST);
|
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 {
|
} else {
|
||||||
std::cout << "Incoming Demod data empty?" << std::endl;
|
std::cout << "Incoming Demod data empty?" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
class ScopeCanvas: public wxGLCanvas {
|
class ScopeCanvas: public wxGLCanvas {
|
||||||
public:
|
public:
|
||||||
|
std::vector<float> waveform_points;
|
||||||
|
|
||||||
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
|
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
|
||||||
~ScopeCanvas();
|
~ScopeCanvas();
|
||||||
|
|
||||||
@ -23,7 +25,6 @@ private:
|
|||||||
void OnIdle(wxIdleEvent &event);
|
void OnIdle(wxIdleEvent &event);
|
||||||
|
|
||||||
wxWindow *parent;
|
wxWindow *parent;
|
||||||
std::vector<float> waveform_points;
|
|
||||||
|
|
||||||
ScopeContext *glContext;
|
ScopeContext *glContext;
|
||||||
// event table
|
// event table
|
||||||
|
Loading…
Reference in New Issue
Block a user