mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-08-19 21:42:28 -04:00
Merge branch 'bodrick-master'
This commit is contained in:
commit
3d4f844d5e
1
external/rtaudio/RtAudio.cpp
vendored
1
external/rtaudio/RtAudio.cpp
vendored
@ -45,6 +45,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// Static variable definitions.
|
// Static variable definitions.
|
||||||
const unsigned int RtApi::MAX_SAMPLE_RATES = 14;
|
const unsigned int RtApi::MAX_SAMPLE_RATES = 14;
|
||||||
|
@ -34,7 +34,7 @@ EVT_IDLE(AppFrame::OnIdle)
|
|||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
AppFrame::AppFrame() :
|
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 *vbox = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer *demodOpts = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *demodOpts = new wxBoxSizer(wxVERTICAL);
|
||||||
@ -280,7 +280,7 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
|
|||||||
wxGetApp().getDemodMgr().terminateAll();
|
wxGetApp().getDemodMgr().terminateAll();
|
||||||
wxGetApp().setFrequency(DEFAULT_FREQ);
|
wxGetApp().setFrequency(DEFAULT_FREQ);
|
||||||
wxGetApp().setOffset(0);
|
wxGetApp().setOffset(0);
|
||||||
SetTitle(wxT(CUBICSDR_TITLE));
|
SetTitle(CUBICSDR_TITLE);
|
||||||
currentSessionFile = "";
|
currentSessionFile = "";
|
||||||
} else if (event.GetId() == wxID_EXIT) {
|
} else if (event.GetId() == wxID_EXIT) {
|
||||||
Close(false);
|
Close(false);
|
||||||
|
@ -56,12 +56,14 @@ void DemodulatorThread::threadMain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int h_len = estimate_req_filter_len(ft, As);
|
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);
|
liquid_firdes_kaiser(h_len, firStereoCutoff, As, mu, h);
|
||||||
|
|
||||||
firStereoLeft = firfilt_rrrf_create(h, h_len);
|
firStereoLeft = firfilt_rrrf_create(h, h_len);
|
||||||
firStereoRight = firfilt_rrrf_create(h, h_len);
|
firStereoRight = firfilt_rrrf_create(h, h_len);
|
||||||
|
|
||||||
|
delete h;
|
||||||
|
|
||||||
liquid_float_complex x, y;
|
liquid_float_complex x, y;
|
||||||
|
|
||||||
firhilbf firStereoR2C = firhilbf_create(5, 60.0f);
|
firhilbf firStereoR2C = firhilbf_create(5, 60.0f);
|
||||||
@ -81,11 +83,13 @@ void DemodulatorThread::threadMain() {
|
|||||||
float ssbAs = 120.0f; // stop-band attenuation [dB]
|
float ssbAs = 120.0f; // stop-band attenuation [dB]
|
||||||
|
|
||||||
h_len = estimate_req_filter_len(ssbFt, ssbAs);
|
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);
|
liquid_firdes_kaiser(h_len, 0.25, ssbAs, 0.0, ssb_h);
|
||||||
|
|
||||||
firfilt_crcf firSSB = firfilt_crcf_create(ssb_h, h_len);
|
firfilt_crcf firSSB = firfilt_crcf_create(ssb_h, h_len);
|
||||||
|
|
||||||
|
delete ssb_h;
|
||||||
|
|
||||||
// Automatic IQ gain
|
// Automatic IQ gain
|
||||||
iqAutoGain = agc_crcf_create();
|
iqAutoGain = agc_crcf_create();
|
||||||
agc_crcf_set_bandwidth(iqAutoGain, 0.9);
|
agc_crcf_set_bandwidth(iqAutoGain, 0.9);
|
||||||
|
@ -88,7 +88,7 @@ void SDRPostThread::threadMain() {
|
|||||||
|
|
||||||
iirfilt_crcf_execute_block(dcFilter, &fpData[0], dataSize, &dataOut[0]);
|
iirfilt_crcf_execute_block(dcFilter, &fpData[0], dataSize, &dataOut[0]);
|
||||||
|
|
||||||
if (iqDataOutQueue != NULL) {
|
if (iqDataOutQueue.load() != NULL) {
|
||||||
DemodulatorThreadIQData *pipeDataOut = new DemodulatorThreadIQData;
|
DemodulatorThreadIQData *pipeDataOut = new DemodulatorThreadIQData;
|
||||||
|
|
||||||
pipeDataOut->frequency = data_in->frequency;
|
pipeDataOut->frequency = data_in->frequency;
|
||||||
@ -97,7 +97,7 @@ void SDRPostThread::threadMain() {
|
|||||||
iqDataOutQueue.load()->push(pipeDataOut);
|
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.size() < num_vis_samples) {
|
||||||
if (visualDataOut->data.capacity() < num_vis_samples) {
|
if (visualDataOut->data.capacity() < num_vis_samples) {
|
||||||
visualDataOut->data.reserve(num_vis_samples);
|
visualDataOut->data.reserve(num_vis_samples);
|
||||||
|
@ -262,7 +262,7 @@ void SDRThread::threadMain() {
|
|||||||
double time_slice = (double) n_read / (double) sampleRate;
|
double time_slice = (double) n_read / (double) sampleRate;
|
||||||
seconds += time_slice;
|
seconds += time_slice;
|
||||||
|
|
||||||
if (iqDataOutQueue != NULL) {
|
if (iqDataOutQueue.load() != NULL) {
|
||||||
iqDataOutQueue.load()->push(dataOut);
|
iqDataOutQueue.load()->push(dataOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user