Merge branch 'master' into visual-studio-updates

This commit is contained in:
Charles J. Cliffe 2015-01-25 21:42:19 -05:00
commit 86c4faf845
3 changed files with 9 additions and 3 deletions

View File

@ -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() {

View File

@ -90,4 +90,5 @@ private:
long long currentFrequency;
int currentBandwidth;
int currentDemodType;
int currentOutputDevice;
};

View File

@ -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();