mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 13:18:37 -05:00
Fix demodulator selection menu radio and display
This commit is contained in:
parent
3d4f844d5e
commit
e504f4f282
@ -2,7 +2,7 @@
|
||||
|
||||
DemodulatorInstance::DemodulatorInstance() :
|
||||
t_Demod(NULL), t_PreDemod(NULL), t_Audio(NULL), threadQueueDemod(NULL), demodulatorThread(NULL), terminated(true), audioTerminated(true), demodTerminated(
|
||||
true), preDemodTerminated(true), active(false), squelch(false), stereo(false), currentFrequency(0), currentBandwidth(0) {
|
||||
true), preDemodTerminated(true), active(false), squelch(false), stereo(false), currentFrequency(0), currentBandwidth(0), currentOutputDevice(-1) {
|
||||
|
||||
label = new std::string("Unnamed");
|
||||
threadQueueDemod = new DemodulatorThreadInputQueue;
|
||||
@ -224,10 +224,15 @@ void DemodulatorInstance::setOutputDevice(int device_id) {
|
||||
command.int_value = device_id;
|
||||
audioThread->getCommandQueue()->push(command);
|
||||
}
|
||||
currentOutputDevice = device_id;
|
||||
}
|
||||
|
||||
int DemodulatorInstance::getOutputDevice() {
|
||||
return audioThread->getOutputDevice();
|
||||
if (currentOutputDevice == -1) {
|
||||
return audioThread->getOutputDevice();
|
||||
} else {
|
||||
return currentOutputDevice;
|
||||
}
|
||||
}
|
||||
|
||||
void DemodulatorInstance::checkBandwidth() {
|
||||
|
@ -90,4 +90,5 @@ private:
|
||||
long long currentFrequency;
|
||||
int currentBandwidth;
|
||||
int currentDemodType;
|
||||
int currentOutputDevice;
|
||||
};
|
||||
|
@ -70,10 +70,10 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
glViewport(0, 0, ClientSize.x, ClientSize.y);
|
||||
|
||||
glContext->DrawBegin();
|
||||
glContext->Plot(waveform_points, stereo);
|
||||
if (!deviceName.empty()) {
|
||||
glContext->DrawDeviceName(deviceName);
|
||||
}
|
||||
glContext->Plot(waveform_points, stereo);
|
||||
glContext->DrawEnd();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user