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