Fixes to allow Compilation using VC++ 12

Some minor fixes and tweaks to allow compilation under Visual C++ 12.
This doesn't include changes that I need to make to the build
generation.
This commit is contained in:
Chris Motch 2015-01-24 22:01:47 -05:00
parent f1f71c6080
commit 1ed7d95193
5 changed files with 8 additions and 7 deletions

View File

@ -45,6 +45,7 @@
#include <cstdlib>
#include <cstring>
#include <climits>
#include <algorithm>
// Static variable definitions.
const unsigned int RtApi::MAX_SAMPLE_RATES = 14;

View File

@ -34,7 +34,7 @@ EVT_IDLE(AppFrame::OnIdle)
wxEND_EVENT_TABLE()
AppFrame::AppFrame() :
wxFrame(NULL, wxID_ANY, wxT(CUBICSDR_TITLE)), activeDemodulator(NULL) {
wxFrame(NULL, wxID_ANY, CUBICSDR_TITLE), activeDemodulator(NULL) {
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *demodOpts = new wxBoxSizer(wxVERTICAL);
@ -280,7 +280,7 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
wxGetApp().getDemodMgr().terminateAll();
wxGetApp().setFrequency(DEFAULT_FREQ);
wxGetApp().setOffset(0);
SetTitle(wxT(CUBICSDR_TITLE));
SetTitle(CUBICSDR_TITLE);
currentSessionFile = "";
} else if (event.GetId() == wxID_EXIT) {
Close(false);

View File

@ -56,7 +56,7 @@ void DemodulatorThread::threadMain() {
}
unsigned int h_len = estimate_req_filter_len(ft, As);
float h[h_len];
float *h = new float[h_len];
liquid_firdes_kaiser(h_len, firStereoCutoff, As, mu, h);
firStereoLeft = firfilt_rrrf_create(h, h_len);
@ -81,7 +81,7 @@ void DemodulatorThread::threadMain() {
float ssbAs = 120.0f; // stop-band attenuation [dB]
h_len = estimate_req_filter_len(ssbFt, ssbAs);
float ssb_h[h_len];
float *ssb_h=new float[h_len];
liquid_firdes_kaiser(h_len, 0.25, ssbAs, 0.0, ssb_h);
firfilt_crcf firSSB = firfilt_crcf_create(ssb_h, h_len);

View File

@ -88,7 +88,7 @@ void SDRPostThread::threadMain() {
iirfilt_crcf_execute_block(dcFilter, &fpData[0], dataSize, &dataOut[0]);
if (iqDataOutQueue != NULL) {
if (iqDataOutQueue.load() != NULL) {
DemodulatorThreadIQData *pipeDataOut = new DemodulatorThreadIQData;
pipeDataOut->frequency = data_in->frequency;
@ -97,7 +97,7 @@ void SDRPostThread::threadMain() {
iqDataOutQueue.load()->push(pipeDataOut);
}
if (iqVisualQueue != NULL && iqVisualQueue.load()->empty()) {
if (iqVisualQueue.load() != NULL && iqVisualQueue.load()->empty()) {
if (visualDataOut->data.size() < num_vis_samples) {
if (visualDataOut->data.capacity() < num_vis_samples) {
visualDataOut->data.reserve(num_vis_samples);

View File

@ -262,7 +262,7 @@ void SDRThread::threadMain() {
double time_slice = (double) n_read / (double) sampleRate;
seconds += time_slice;
if (iqDataOutQueue != NULL) {
if (iqDataOutQueue.load() != NULL) {
iqDataOutQueue.load()->push(dataOut);
}
}