mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 05:38:39 -05:00
Put the default sample rates back, might be causing bad init..
This commit is contained in:
parent
0cad2f1cfa
commit
cd82ecb15b
@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
SET(CUBICSDR_VERSION_MAJOR "0")
|
||||
SET(CUBICSDR_VERSION_MINOR "1")
|
||||
SET(CUBICSDR_VERSION_PATCH "11")
|
||||
SET(CUBICSDR_VERSION_PATCH "12")
|
||||
SET(CUBICSDR_VERSION_REL "alpha")
|
||||
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}-${CUBICSDR_VERSION_REL}")
|
||||
|
||||
|
@ -112,9 +112,9 @@ long long strToFrequency(std::string freqStr) {
|
||||
}
|
||||
|
||||
|
||||
CubicSDR::CubicSDR() : appframe(NULL), m_glContext(NULL), frequency(0), offset(0), ppm(0), snap(1), sampleRate(0), directSamplingMode(0),
|
||||
CubicSDR::CubicSDR() : appframe(NULL), m_glContext(NULL), frequency(0), offset(0), ppm(0), snap(1), sampleRate(DEFAULT_SAMPLE_RATE), directSamplingMode(0),
|
||||
sdrThread(NULL), sdrPostThread(NULL), spectrumVisualThread(NULL), demodVisualThread(NULL), pipeSDRIQData(NULL), pipeIQVisualData(NULL), pipeAudioVisualData(NULL), t_SDR(NULL), t_PostSDR(NULL) {
|
||||
|
||||
sampleRateInitialized.store(false);
|
||||
}
|
||||
|
||||
|
||||
@ -412,8 +412,9 @@ void CubicSDR::setDevice(SDRDeviceInfo *dev) {
|
||||
// }
|
||||
|
||||
// Try for a reasonable default sample rate.
|
||||
if (!sampleRate) {
|
||||
if (!sampleRateInitialized.load()) {
|
||||
sampleRate = chan->getSampleRateNear(DEFAULT_SAMPLE_RATE);
|
||||
sampleRateInitialized.store(true);
|
||||
}
|
||||
|
||||
int rateHigh, rateLow;
|
||||
|
@ -142,6 +142,7 @@ private:
|
||||
std::thread *t_SDR, *t_SDREnum, *t_PostSDR, *t_SpectrumVisual, *t_DemodVisual;
|
||||
std::atomic_bool devicesReady;
|
||||
std::atomic_bool deviceSelectorOpen;
|
||||
std::atomic_bool sampleRateInitialized;
|
||||
std::string notifyMessage;
|
||||
std::mutex notify_busy;
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ SDRThread::SDRThread() : IOThread() {
|
||||
deviceConfig.store(NULL);
|
||||
deviceInfo.store(NULL);
|
||||
|
||||
sampleRate.store(0);
|
||||
sampleRate.store(DEFAULT_SAMPLE_RATE);
|
||||
frequency.store(0);
|
||||
offset.store(0);
|
||||
ppm.store(0);
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
std::vector<liquid_float_complex> data;
|
||||
|
||||
SDRThreadIQData() :
|
||||
frequency(0), sampleRate(0), dcCorrected(true), numChannels(0) {
|
||||
frequency(0), sampleRate(DEFAULT_SAMPLE_RATE), dcCorrected(true), numChannels(0) {
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user