This commit is contained in:
Charles J. Cliffe 2015-08-03 23:41:37 -04:00
parent 00713c0259
commit bab2ad3780
13 changed files with 8 additions and 24 deletions

View File

@ -561,12 +561,6 @@ void AppFrame::OnThread(wxCommandEvent& event) {
}
void AppFrame::OnIdle(wxIdleEvent& event) {
bool work_done = false;
//#ifdef __APPLE__
// std::this_thread::sleep_for(std::chrono::milliseconds(4));
// std::this_thread::yield();
//#endif
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();

View File

@ -12,13 +12,13 @@ std::map<int, int> AudioThread::deviceSampleRate;
std::map<int, std::thread *> AudioThread::deviceThread;
AudioThread::AudioThread() : IOThread(),
currentInput(NULL), inputQueue(NULL), gain(
1.0), threadQueueNotify(NULL), sampleRate(0), nBufferFrames(1024) {
currentInput(NULL), inputQueue(NULL), nBufferFrames(1024), threadQueueNotify(NULL), sampleRate(0) {
audioQueuePtr.store(0);
underflowCount.store(0);
active.store(false);
outputDevice.store(-1);
gain.store(1.0);
boundThreads = new std::vector<AudioThread *>;
}

View File

@ -188,7 +188,6 @@ void DemodulatorThread::run() {
} else if (demodulatorType == DEMOD_TYPE_RAW) {
// do nothing here..
} else {
float p;
switch (demodulatorType.load()) {
case DEMOD_TYPE_LSB:
for (int i = 0; i < bufSize; i++) { // Reject upper band

View File

@ -1598,8 +1598,8 @@ bool DataTree::LoadFromFile(const std::string& filename) {
string compressionType(*header->getNext("compression"));
dataSize = *header->getNext("uncompressed_size");
bool uncompress = false;
#if USE_FASTLZ
bool uncompress = false;
if (compressionType == "FastLZ") {
uncompress = true;
}

View File

@ -36,8 +36,6 @@ void initGLExtensions() {
std::cout << std::endl << "Supported GL Extensions: " << std::endl << extensions << std::endl << std::endl;
int interval = 2;
#ifdef _WIN32
if (GLExtSupported("WGL_EXT_swap_control")) {
std::cout << "Initializing WGL swap control extensions.." << std::endl;

View File

@ -103,7 +103,7 @@ int GLFontChar::getIndex() {
}
GLFont::GLFont() :
numCharacters(0), lineHeight(0), base(0), imageWidth(0), imageHeight(0), loaded(false), texId(0) {
lineHeight(0), base(0), imageWidth(0), imageHeight(0), loaded(false), texId(0) {
}

View File

@ -76,7 +76,6 @@ private:
std::string getParamKey(std::string param_str);
std::string getParamValue(std::string param_str);
int numCharacters;
int lineHeight;
int base;
int imageWidth, imageHeight;

View File

@ -7,7 +7,7 @@
#include "ColorTheme.h"
SpectrumContext::SpectrumContext(SpectrumCanvas *canvas, wxGLContext *sharedContext) :
PrimaryGLContext(canvas, sharedContext), fft_size(0), floorValue(0), ceilValue(1) {
PrimaryGLContext(canvas, sharedContext), floorValue(0), ceilValue(1) {
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);

View File

@ -19,6 +19,5 @@ public:
void setCeilValue(float ceilValue);
private:
int fft_size;
float floorValue, ceilValue;
};

View File

@ -31,7 +31,7 @@ EVT_KEY_UP(TuningCanvas::OnKeyUp)
wxEND_EVENT_TABLE()
TuningCanvas::TuningCanvas(wxWindow *parent, int *attribList) :
InteractiveCanvas(parent, attribList), dragAccum(0), top(false), bottom(false), uxDown(0) {
InteractiveCanvas(parent, attribList), dragAccum(0), uxDown(0), top(false), bottom(false) {
glContext = new TuningContext(this, &wxGetApp().GetContext(this));

View File

@ -36,7 +36,7 @@ wxEND_EVENT_TABLE()
WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *attribList) :
InteractiveCanvas(parent, attribList), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), fft_size(0), waterfall_lines(
0), zoom(1), mouseZoom(1), hoverAlpha(1.0), dragOfs(0) {
0), mouseZoom(1), zoom(1), hoverAlpha(1.0), dragOfs(0) {
glContext = new WaterfallContext(this, &wxGetApp().GetContext(this));
@ -173,7 +173,6 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
int currentBandwidth = getBandwidth();
long long currentCenterFreq = getCenterFrequency();
float demodColor, selectorColor;
ColorTheme *currentTheme = ThemeMgr::mgr.currentTheme;
int last_type = wxGetApp().getDemodMgr().getLastDemodulatorType();
@ -260,13 +259,11 @@ void WaterfallCanvas::OnKeyUp(wxKeyEvent& event) {
void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
InteractiveCanvas::OnKeyDown(event);
float angle = 5.0;
DemodulatorInstance *activeDemod = wxGetApp().getDemodMgr().getActiveDemodulator();
long long freq;
long long originalFreq;
unsigned int bw;
switch (event.GetKeyCode()) {
case 'A':
zoom = 0.95;
@ -425,7 +422,6 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
setStatusText("Click and drag to set the current demodulator range.");
}
} else if (demodsHover->size() && !shiftDown) {
int hovered = -1;
long near_dist = getBandwidth();
DemodulatorInstance *activeDemodulator = NULL;

View File

@ -57,7 +57,6 @@ private:
int waterfall_lines;
int dragOfs;
int lastInputBandwidth;
float mouseZoom, zoom;
float hoverAlpha;

View File

@ -3,7 +3,7 @@
#include "CubicSDR.h"
WaterfallContext::WaterfallContext(WaterfallCanvas *canvas, wxGLContext *sharedContext) :
PrimaryGLContext(canvas, sharedContext), waterfall_lines(0), waterfall_slice(NULL), fft_size(0), activeTheme(NULL) {
PrimaryGLContext(canvas, sharedContext), fft_size(0), waterfall_lines(0), waterfall_slice(NULL), activeTheme(NULL) {
for (int i = 0; i < 2; i++) {
waterfall[i] = 0;
}