mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-02-02 21:04:45 +01:00
new stuff
This commit is contained in:
parent
c1052b1b28
commit
1ef31f0f8b
@ -95,7 +95,14 @@ MOD_EXPORT void _DRAW_MENU_(RadioContext_t* ctx) {
|
|||||||
ctx->sigPath.setDemodulator(SigPath::DEMOD_LSB, ctx->bandWidth);
|
ctx->sigPath.setDemodulator(SigPath::DEMOD_LSB, ctx->bandWidth);
|
||||||
API->setVFOReference(ctx->name, mod::API_t::REF_UPPER);
|
API->setVFOReference(ctx->name, mod::API_t::REF_UPPER);
|
||||||
}
|
}
|
||||||
if (ImGui::RadioButton(CONCAT("RAW##_", ctx->name), ctx->demod == 7) && ctx->demod != 7) { ctx->demod = 7; };
|
if (ImGui::RadioButton(CONCAT("RAW##_", ctx->name), ctx->demod == 7) && ctx->demod != 7) {
|
||||||
|
ctx->demod = 7;
|
||||||
|
ctx->bandWidth = 10000;
|
||||||
|
ctx->bandWidthMin = 3000;
|
||||||
|
ctx->bandWidthMax = 10000;
|
||||||
|
ctx->sigPath.setDemodulator(SigPath::DEMOD_RAW, ctx->bandWidth);
|
||||||
|
API->setVFOReference(ctx->name, mod::API_t::REF_CENTER);
|
||||||
|
};
|
||||||
ImGui::Columns(1, CONCAT("EndRadioModeColumns##_", ctx->name), false);
|
ImGui::Columns(1, CONCAT("EndRadioModeColumns##_", ctx->name), false);
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
@ -28,10 +28,13 @@ void SigPath::init(std::string vfoName, uint64_t sampleRate, int blockSize, dsp:
|
|||||||
bandwidth = 200000;
|
bandwidth = 200000;
|
||||||
|
|
||||||
// TODO: Set default VFO options
|
// TODO: Set default VFO options
|
||||||
|
// TODO: ajust deemphasis for different output sample rates
|
||||||
|
// TODO: Add a mono to stereo for different modes
|
||||||
|
|
||||||
demod.init(input, 100000, 200000, 800);
|
demod.init(input, 100000, 200000, 800);
|
||||||
amDemod.init(input, 50);
|
amDemod.init(input, 50);
|
||||||
ssbDemod.init(input, 6000, 3000, 22);
|
ssbDemod.init(input, 6000, 3000, 22);
|
||||||
|
cpx2stereo.init(input, 22);
|
||||||
|
|
||||||
audioResamp.init(&demod.output, 200000, 48000, 800);
|
audioResamp.init(&demod.output, 200000, 48000, 800);
|
||||||
deemp.init(&audioResamp.output, 800, 50e-6, 48000);
|
deemp.init(&audioResamp.output, 800, 50e-6, 48000);
|
||||||
@ -77,6 +80,9 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
else if (_demod == DEMOD_DSB) {
|
else if (_demod == DEMOD_DSB) {
|
||||||
ssbDemod.stop();
|
ssbDemod.stop();
|
||||||
}
|
}
|
||||||
|
else if (_demod == DEMOD_RAW) {
|
||||||
|
cpx2stereo.stop();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (stop)");
|
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (stop)");
|
||||||
}
|
}
|
||||||
@ -145,6 +151,14 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
deemp.bypass = true;
|
deemp.bypass = true;
|
||||||
ssbDemod.start();
|
ssbDemod.start();
|
||||||
}
|
}
|
||||||
|
else if (demId == DEMOD_RAW) {
|
||||||
|
API->setVFOSampleRate(vfoName, 10000, bandwidth);
|
||||||
|
cpx2stereo.setBlockSize(API->getVFOOutputBlockSize(vfoName));
|
||||||
|
//audioResamp.setInput(&cpx2stereo.output);
|
||||||
|
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
||||||
|
audioResamp.setInputSampleRate(10000, API->getVFOOutputBlockSize(vfoName), audioBw, audioBw);
|
||||||
|
cpx2stereo.start();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (start): {0}", demId);
|
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setDemodulator (start): {0}", demId);
|
||||||
}
|
}
|
||||||
@ -207,6 +221,9 @@ void SigPath::setBandwidth(float bandWidth) {
|
|||||||
ssbDemod.setBandwidth(bandwidth);
|
ssbDemod.setBandwidth(bandwidth);
|
||||||
ssbDemod.start();
|
ssbDemod.start();
|
||||||
}
|
}
|
||||||
|
else if (_demod == DEMOD_RAW) {
|
||||||
|
// Notbing to change
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setBandwidth");
|
spdlog::error("UNIMPLEMENTED DEMODULATOR IN SigPath::setBandwidth");
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
DEMOD_USB,
|
DEMOD_USB,
|
||||||
DEMOD_LSB,
|
DEMOD_LSB,
|
||||||
DEMOD_DSB,
|
DEMOD_DSB,
|
||||||
|
DEMOD_RAW,
|
||||||
_DEMOD_COUNT
|
_DEMOD_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -52,9 +53,11 @@ private:
|
|||||||
dsp::FMDemodulator demod;
|
dsp::FMDemodulator demod;
|
||||||
dsp::AMDemodulator amDemod;
|
dsp::AMDemodulator amDemod;
|
||||||
dsp::SSBDemod ssbDemod;
|
dsp::SSBDemod ssbDemod;
|
||||||
|
dsp::ComplexToStereo cpx2stereo;
|
||||||
|
|
||||||
// Audio output
|
// Audio output
|
||||||
dsp::FloatFIRResampler audioResamp;
|
dsp::MonoToStereo m2s;
|
||||||
|
dsp::FIRResampler<float> audioResamp;
|
||||||
|
|
||||||
std::string vfoName;
|
std::string vfoName;
|
||||||
|
|
||||||
|
@ -3,25 +3,25 @@
|
|||||||
"Radio": {
|
"Radio": {
|
||||||
"device": "Speakers (Realtek High Definiti",
|
"device": "Speakers (Realtek High Definiti",
|
||||||
"sampleRate": 48000.0,
|
"sampleRate": 48000.0,
|
||||||
"volume": 0.32258063554763794
|
"volume": 0.4354838728904724
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bandPlan": "General",
|
"bandPlan": "General",
|
||||||
"bandPlanEnabled": true,
|
"bandPlanEnabled": true,
|
||||||
"fftHeight": 300,
|
"fftHeight": 300,
|
||||||
"frequency": 99000000,
|
"frequency": 91000000,
|
||||||
"max": 0.0,
|
"max": 0.0,
|
||||||
"maximized": false,
|
"maximized": false,
|
||||||
"menuWidth": 300,
|
"menuWidth": 300,
|
||||||
"min": -52.20588302612305,
|
"min": -70.0,
|
||||||
"showWaterfall": true,
|
"showWaterfall": true,
|
||||||
"source": "HackRF One #0 901868dc282c8f8b",
|
"source": "HackRF One #0 901868dc282c8f8b",
|
||||||
"sourceSettings": {
|
"sourceSettings": {
|
||||||
"HackRF One #0 901868dc282c8f8b": {
|
"HackRF One #0 901868dc282c8f8b": {
|
||||||
"gains": {
|
"gains": {
|
||||||
"AMP": 0.0,
|
"AMP": 0.0,
|
||||||
"LNA": 24.503000259399414,
|
"LNA": 0.0,
|
||||||
"VGA": 16.229999542236328
|
"VGA": 0.0
|
||||||
},
|
},
|
||||||
"sampleRate": 8000000
|
"sampleRate": 8000000
|
||||||
}
|
}
|
||||||
|
BIN
root/sdrpp_0.2.5_alpha_preview.zip
Normal file
BIN
root/sdrpp_0.2.5_alpha_preview.zip
Normal file
Binary file not shown.
@ -3,13 +3,13 @@
|
|||||||
"Radio": {
|
"Radio": {
|
||||||
"device": "Speakers (Realtek High Definiti",
|
"device": "Speakers (Realtek High Definiti",
|
||||||
"sampleRate": 48000.0,
|
"sampleRate": 48000.0,
|
||||||
"volume": 0.2956989109516144
|
"volume": 0.4032258093357086
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bandPlan": "General",
|
"bandPlan": "General",
|
||||||
"bandPlanEnabled": true,
|
"bandPlanEnabled": true,
|
||||||
"fftHeight": 300,
|
"fftHeight": 300,
|
||||||
"frequency": 103184112,
|
"frequency": 100100000,
|
||||||
"max": 0.0,
|
"max": 0.0,
|
||||||
"maximized": false,
|
"maximized": false,
|
||||||
"menuWidth": 300,
|
"menuWidth": 300,
|
||||||
@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"windowSize": {
|
"windowSize": {
|
||||||
"h": 720,
|
"h": 725,
|
||||||
"w": 1280
|
"w": 1280
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Radio": "./modules/radio.dll",
|
"Radio": "../build/modules/radio/Release/radio.dll",
|
||||||
"Recorder": "./modules/recorder.dll"
|
"Recorder": "../build/modules/recorder/Release/recorder.dll"
|
||||||
}
|
}
|
121
src/dsp/block.h
Normal file
121
src/dsp/block.h
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
#include <dsp/stream.h>
|
||||||
|
|
||||||
|
namespace dsp {
|
||||||
|
template <class D, class I, class O, int IC, int OC>
|
||||||
|
class Block {
|
||||||
|
public:
|
||||||
|
Block(std::vector<int> inBs, std::vector<int> outBs, D* inst, void (*workerFunc)(D* _this)) {
|
||||||
|
derived = inst;
|
||||||
|
worker = workerFunc;
|
||||||
|
inputBlockSize = inBs;
|
||||||
|
outputBlockSize = outBs;
|
||||||
|
in.reserve(IC);
|
||||||
|
out.reserve(OC);
|
||||||
|
for (int i = 0; i < IC; i++) {
|
||||||
|
in.push_back(NULL);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < OC; i++) {
|
||||||
|
out.push_back(new stream<I>(outBs[i] * 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void start() {
|
||||||
|
if (running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
running = true;
|
||||||
|
startHandler();
|
||||||
|
workerThread = std::thread(worker, derived);
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
if (!running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
stopHandler();
|
||||||
|
for (auto is : in) {
|
||||||
|
is->stopReader();
|
||||||
|
}
|
||||||
|
for (auto os : out) {
|
||||||
|
os->stopWriter();
|
||||||
|
}
|
||||||
|
workerThread.join();
|
||||||
|
|
||||||
|
for (auto is : in) {
|
||||||
|
is->clearReadStop();
|
||||||
|
}
|
||||||
|
for (auto os : out) {
|
||||||
|
os->clearWriteStop();
|
||||||
|
}
|
||||||
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setBlockSize(int blockSize) {
|
||||||
|
if (running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < IC; i++) {
|
||||||
|
in[i]->setMaxLatency(blockSize * 2);
|
||||||
|
inputBlockSize[i] = blockSize;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < OC; i++) {
|
||||||
|
out[i]->setMaxLatency(blockSize * 2);
|
||||||
|
outputBlockSize[i] = blockSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<stream<I>*> out;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void startHandler() {}
|
||||||
|
virtual void stopHandler() {}
|
||||||
|
std::vector<stream<I>*> in;
|
||||||
|
std::vector<int> inputBlockSize;
|
||||||
|
std::vector<int> outputBlockSize;
|
||||||
|
bool running = false;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void (*worker)(D* _this);
|
||||||
|
std::thread workerThread;
|
||||||
|
D* derived;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class DemoMultiplier : public Block<DemoMultiplier, complex_t, complex_t, 2, 1> {
|
||||||
|
public:
|
||||||
|
DemoMultiplier() : Block({2}, {1}, this, worker) {}
|
||||||
|
|
||||||
|
void init(stream<complex_t>* a, stream<complex_t>* b, int blockSize) {
|
||||||
|
in[0] = a;
|
||||||
|
in[1] = b;
|
||||||
|
inputBlockSize[0] = blockSize;
|
||||||
|
inputBlockSize[1] = blockSize;
|
||||||
|
out[0]->setMaxLatency(blockSize * 2);
|
||||||
|
outputBlockSize[0] = blockSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void worker(DemoMultiplier* _this) {
|
||||||
|
int blockSize = _this->inputBlockSize[0];
|
||||||
|
stream<complex_t>* inA = _this->in[0];
|
||||||
|
stream<complex_t>* inB = _this->in[1];
|
||||||
|
stream<complex_t>* out = _this->out[0];
|
||||||
|
complex_t* aBuf = (complex_t*)volk_malloc(sizeof(complex_t) * blockSize, volk_get_alignment());
|
||||||
|
complex_t* bBuf = (complex_t*)volk_malloc(sizeof(complex_t) * blockSize, volk_get_alignment());
|
||||||
|
complex_t* outBuf = (complex_t*)volk_malloc(sizeof(complex_t) * blockSize, volk_get_alignment());
|
||||||
|
while (true) {
|
||||||
|
if (inA->read(aBuf, blockSize) < 0) { break; };
|
||||||
|
if (inB->read(bBuf, blockSize) < 0) { break; };
|
||||||
|
volk_32fc_x2_multiply_32fc((lv_32fc_t*)outBuf, (lv_32fc_t*)aBuf, (lv_32fc_t*)bBuf, blockSize);
|
||||||
|
if (out->write(outBuf, blockSize) < 0) { break; };
|
||||||
|
}
|
||||||
|
volk_free(aBuf);
|
||||||
|
volk_free(bBuf);
|
||||||
|
volk_free(outBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
@ -86,4 +86,73 @@ namespace dsp {
|
|||||||
std::thread _workerThread;
|
std::thread _workerThread;
|
||||||
bool running = false;
|
bool running = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ComplexToStereo {
|
||||||
|
public:
|
||||||
|
ComplexToStereo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ComplexToStereo(stream<complex_t>* input, int bufferSize) : output(bufferSize * 2) {
|
||||||
|
_in = input;
|
||||||
|
_bufferSize = bufferSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
void init(stream<complex_t>* input, int bufferSize) {
|
||||||
|
output.init(bufferSize * 2);
|
||||||
|
_in = input;
|
||||||
|
_bufferSize = bufferSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
void start() {
|
||||||
|
if (running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_workerThread = std::thread(_worker, this);
|
||||||
|
running = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
if (!running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_in->stopReader();
|
||||||
|
output.stopWriter();
|
||||||
|
_workerThread.join();
|
||||||
|
_in->clearReadStop();
|
||||||
|
output.clearWriteStop();
|
||||||
|
running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBlockSize(int blockSize) {
|
||||||
|
if (running) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_bufferSize = blockSize;
|
||||||
|
output.setMaxLatency(blockSize * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
stream<StereoFloat_t> output;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void _worker(ComplexToStereo* _this) {
|
||||||
|
complex_t* inBuf = new complex_t[_this->_bufferSize];
|
||||||
|
StereoFloat_t* outBuf = new StereoFloat_t[_this->_bufferSize];
|
||||||
|
while (true) {
|
||||||
|
if (_this->_in->read(inBuf, _this->_bufferSize) < 0) { break; };
|
||||||
|
for (int i = 0; i < _this->_bufferSize; i++) {
|
||||||
|
outBuf[i].l = inBuf[i].i;
|
||||||
|
outBuf[i].r = inBuf[i].q;
|
||||||
|
}
|
||||||
|
if (_this->output.write(outBuf, _this->_bufferSize) < 0) { break; };
|
||||||
|
}
|
||||||
|
delete[] inBuf;
|
||||||
|
delete[] outBuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
stream<complex_t>* _in;
|
||||||
|
int _bufferSize;
|
||||||
|
std::thread _workerThread;
|
||||||
|
bool running = false;
|
||||||
|
};
|
||||||
};
|
};
|
File diff suppressed because it is too large
Load Diff
@ -4,10 +4,52 @@ namespace dsp {
|
|||||||
struct complex_t {
|
struct complex_t {
|
||||||
float q;
|
float q;
|
||||||
float i;
|
float i;
|
||||||
|
|
||||||
|
complex_t operator+(complex_t& c) {
|
||||||
|
complex_t res;
|
||||||
|
res.i = c.i + i;
|
||||||
|
res.q = c.q + q;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
complex_t operator-(complex_t& c) {
|
||||||
|
complex_t res;
|
||||||
|
res.i = i - c.i;
|
||||||
|
res.q = q - c.q;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
complex_t operator*(float& f) {
|
||||||
|
complex_t res;
|
||||||
|
res.i = i * f;
|
||||||
|
res.q = q * f;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StereoFloat_t {
|
struct StereoFloat_t {
|
||||||
float l;
|
float l;
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
|
StereoFloat_t operator+(StereoFloat_t& s) {
|
||||||
|
StereoFloat_t res;
|
||||||
|
res.l = s.l + l;
|
||||||
|
res.r = s.r + r;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
StereoFloat_t operator-(StereoFloat_t& s) {
|
||||||
|
StereoFloat_t res;
|
||||||
|
res.l = l - s.l;
|
||||||
|
res.r = r - s.r;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
StereoFloat_t operator*(float& f) {
|
||||||
|
StereoFloat_t res;
|
||||||
|
res.l = l * f;
|
||||||
|
res.r = r * f;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -4,6 +4,7 @@
|
|||||||
#include <dsp/resampling.h>
|
#include <dsp/resampling.h>
|
||||||
#include <dsp/filter.h>
|
#include <dsp/filter.h>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
|
#include <dsp/block.h>
|
||||||
|
|
||||||
namespace dsp {
|
namespace dsp {
|
||||||
class VFO {
|
class VFO {
|
||||||
@ -22,7 +23,8 @@ namespace dsp {
|
|||||||
|
|
||||||
lo.init(offset, inputSampleRate, blockSize);
|
lo.init(offset, inputSampleRate, blockSize);
|
||||||
mixer.init(in, &lo.output, blockSize);
|
mixer.init(in, &lo.output, blockSize);
|
||||||
resamp.init(&mixer.output, inputSampleRate, outputSampleRate, blockSize, _bandWidth * 0.8f, _bandWidth);
|
//resamp.init(&mixer.output, inputSampleRate, outputSampleRate, blockSize, _bandWidth * 0.8f, _bandWidth);
|
||||||
|
resamp.init(mixer.out[0], inputSampleRate, outputSampleRate, blockSize, _bandWidth * 0.8f, _bandWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
@ -87,8 +89,10 @@ namespace dsp {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SineSource lo;
|
SineSource lo;
|
||||||
Multiplier mixer;
|
//Multiplier mixer;
|
||||||
FIRResampler resamp;
|
DemoMultiplier mixer;
|
||||||
|
FIRResampler<complex_t> resamp;
|
||||||
|
DecimatingFIRFilter filter;
|
||||||
stream<complex_t>* _input;
|
stream<complex_t>* _input;
|
||||||
|
|
||||||
float _outputSampleRate;
|
float _outputSampleRate;
|
||||||
|
@ -12,7 +12,7 @@ namespace io {
|
|||||||
SoapyWrapper() {
|
SoapyWrapper() {
|
||||||
SoapySDR::registerLogHandler(_logHandler);
|
SoapySDR::registerLogHandler(_logHandler);
|
||||||
SoapySDR::Device::make("");
|
SoapySDR::Device::make("");
|
||||||
|
|
||||||
output.init(64000);
|
output.init(64000);
|
||||||
currentGains = new float[1];
|
currentGains = new float[1];
|
||||||
refresh();
|
refresh();
|
||||||
|
28
src/main.cpp
28
src/main.cpp
@ -14,6 +14,8 @@
|
|||||||
#include <stb_image.h>
|
#include <stb_image.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <dsp/block.h>
|
||||||
|
|
||||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||||
#include <stb_image_resize.h>
|
#include <stb_image_resize.h>
|
||||||
|
|
||||||
@ -22,7 +24,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Comment to build a normal release
|
// Comment to build a normal release
|
||||||
// #define DEV_BUILD
|
#define DEV_BUILD
|
||||||
|
|
||||||
bool maximized = false;
|
bool maximized = false;
|
||||||
bool fullScreen = false;
|
bool fullScreen = false;
|
||||||
@ -40,6 +42,7 @@ static void maximized_callback(GLFWwindow* window, int n) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// main
|
||||||
int main() {
|
int main() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
//FreeConsole();
|
//FreeConsole();
|
||||||
@ -48,7 +51,7 @@ int main() {
|
|||||||
spdlog::info("SDR++ v" VERSION_STR);
|
spdlog::info("SDR++ v" VERSION_STR);
|
||||||
|
|
||||||
#ifdef DEV_BUILD
|
#ifdef DEV_BUILD
|
||||||
config::setRootDirectory("../root");
|
config::setRootDirectory("../root_dev");
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
config::setRootDirectory(".");
|
config::setRootDirectory(".");
|
||||||
#else
|
#else
|
||||||
@ -134,6 +137,27 @@ int main() {
|
|||||||
|
|
||||||
style::setDarkStyle();
|
style::setDarkStyle();
|
||||||
|
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// glfwPollEvents();
|
||||||
|
// ImGui_ImplOpenGL3_NewFrame();
|
||||||
|
// ImGui_ImplGlfw_NewFrame();
|
||||||
|
// ImGui::NewFrame();
|
||||||
|
|
||||||
|
// ImGui::ShowDemoWindow();
|
||||||
|
|
||||||
|
// ImGui::Render();
|
||||||
|
// int display_w, display_h;
|
||||||
|
// glfwGetFramebufferSize(window, &display_w, &display_h);
|
||||||
|
// glViewport(0, 0, display_w, display_h);
|
||||||
|
// glClearColor(0.0666f, 0.0666f, 0.0666f, 1.0f);
|
||||||
|
// //glClearColor(0.9f, 0.9f, 0.9f, 1.0f);
|
||||||
|
// glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
// ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
|
|
||||||
|
// glfwSwapBuffers(window);
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
spdlog::info("Loading icons");
|
spdlog::info("Loading icons");
|
||||||
icons::load();
|
icons::load();
|
||||||
|
|
||||||
|
@ -216,8 +216,8 @@ void windowInit() {
|
|||||||
// Bandwidth ajustment
|
// Bandwidth ajustment
|
||||||
// CW and RAW modes;
|
// CW and RAW modes;
|
||||||
// Bring VFO to a visible place when changing sample rate if it's smaller
|
// Bring VFO to a visible place when changing sample rate if it's smaller
|
||||||
|
// Add save config for modules
|
||||||
// Have a proper root directory
|
// Do VFO in two steps: First sample rate conversion, then filtering
|
||||||
|
|
||||||
// And a module add/remove/change order menu
|
// And a module add/remove/change order menu
|
||||||
// get rid of watchers and use if() instead
|
// get rid of watchers and use if() instead
|
||||||
|
@ -33,6 +33,7 @@ namespace ImGui {
|
|||||||
float lowerOffset;
|
float lowerOffset;
|
||||||
float upperOffset;
|
float upperOffset;
|
||||||
float bandwidth;
|
float bandwidth;
|
||||||
|
float snapInterval;
|
||||||
int reference = REF_CENTER;
|
int reference = REF_CENTER;
|
||||||
|
|
||||||
ImVec2 rectMin;
|
ImVec2 rectMin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user