mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
more fixes
This commit is contained in:
parent
9805e4a395
commit
92b77904f6
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ build/
|
|||||||
*.zip
|
*.zip
|
||||||
*.wav
|
*.wav
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
sdrpp_v0.2.5_beta_x64
|
@ -145,12 +145,12 @@ private:
|
|||||||
int bufferSize = sampleRate / 60.0f;
|
int bufferSize = sampleRate / 60.0f;
|
||||||
|
|
||||||
if (dev->channels == 2) {
|
if (dev->channels == 2) {
|
||||||
stereoRB.data.setMaxLatency(bufferSize * 3);
|
stereoRB.data.setMaxLatency(bufferSize * 2);
|
||||||
stereoRB.start();
|
stereoRB.start();
|
||||||
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _stereo_cb, this);
|
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _stereo_cb, this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
monoRB.data.setMaxLatency(bufferSize * 3);
|
monoRB.data.setMaxLatency(bufferSize * 2);
|
||||||
monoRB.start();
|
monoRB.start();
|
||||||
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _mono_cb, this);
|
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _mono_cb, this);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,6 @@ int sdrpp_main() {
|
|||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
glfwSwapInterval(1); // Enable vsync
|
|
||||||
|
|
||||||
#if (GLFW_VERSION_MAJOR == 3) && (GLFW_VERSION_MINOR >= 3)
|
#if (GLFW_VERSION_MAJOR == 3) && (GLFW_VERSION_MINOR >= 3)
|
||||||
if (maximized) {
|
if (maximized) {
|
||||||
@ -240,6 +239,7 @@ int sdrpp_main() {
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
|
|
||||||
|
glfwSwapInterval(1); // Enable vsync
|
||||||
glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ namespace dsp {
|
|||||||
generic_block<AGC>::registerOutput(&out);
|
generic_block<AGC>::registerOutput(&out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setInputSize(stream<float>* in) {
|
void setInput(stream<float>* in) {
|
||||||
std::lock_guard<std::mutex> lck(generic_block<AGC>::ctrlMtx);
|
std::lock_guard<std::mutex> lck(generic_block<AGC>::ctrlMtx);
|
||||||
generic_block<AGC>::tempStop();
|
generic_block<AGC>::tempStop();
|
||||||
generic_block<AGC>::unregisterInput(_in);
|
generic_block<AGC>::unregisterInput(_in);
|
||||||
|
@ -62,6 +62,8 @@
|
|||||||
#if !defined(DUK_CONFIG_H_INCLUDED)
|
#if !defined(DUK_CONFIG_H_INCLUDED)
|
||||||
#define DUK_CONFIG_H_INCLUDED
|
#define DUK_CONFIG_H_INCLUDED
|
||||||
|
|
||||||
|
#define DUK_USE_DATE_NOW_WINDOWS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Intermediate helper defines
|
* Intermediate helper defines
|
||||||
*/
|
*/
|
||||||
|
@ -127,6 +127,7 @@ void windowInit() {
|
|||||||
// Add squelsh
|
// Add squelsh
|
||||||
// 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
|
||||||
|
// Use DUK_USE_DATE_NOW_WINDOWS for windows 7 support
|
||||||
|
|
||||||
// TODO for 0.2.6
|
// TODO for 0.2.6
|
||||||
// And a module add/remove/change order menu
|
// And a module add/remove/change order menu
|
||||||
|
@ -114,24 +114,24 @@ private:
|
|||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
|
if (_this->demod == 1) {
|
||||||
ImGui::Text("WFM Deemphasis");
|
ImGui::Text("WFM Deemphasis");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::PushItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
||||||
if (ImGui::Combo(CONCAT("##_deemp_select_", _this->name), &_this->deemp, DEEMP_LIST)) {
|
if (ImGui::Combo(CONCAT("##_deemp_select_", _this->name), &_this->deemp, DEEMP_LIST)) {
|
||||||
_this->sigPath.setDeemphasis(_this->deemp);
|
_this->sigPath.setDeemphasis(_this->deemp);
|
||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
}
|
||||||
|
|
||||||
|
|
||||||
ImGui::Text("Bandwidth");
|
ImGui::Text("Bandwidth");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::PushItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
||||||
if (ImGui::InputInt(CONCAT("##_bw_select_", _this->name), &_this->bandWidth, 100, 1000)) {
|
if (ImGui::InputInt(CONCAT("##_bw_select_", _this->name), &_this->bandWidth, 100, 1000)) {
|
||||||
_this->bandWidth = std::clamp<int>(_this->bandWidth, _this->bandWidthMin, _this->bandWidthMax);
|
_this->bandWidth = std::clamp<int>(_this->bandWidth, _this->bandWidthMin, _this->bandWidthMax);
|
||||||
_this->sigPath.setBandwidth(_this->bandWidth);
|
_this->sigPath.setBandwidth(_this->bandWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::PopItemWidth();
|
|
||||||
|
|
||||||
ImGui::Text("Snap Interval");
|
ImGui::Text("Snap Interval");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
|
||||||
|
@ -84,12 +84,15 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
amDemod.stop();
|
amDemod.stop();
|
||||||
}
|
}
|
||||||
else if (_demod == DEMOD_USB) {
|
else if (_demod == DEMOD_USB) {
|
||||||
|
agc.stop();
|
||||||
ssbDemod.stop();
|
ssbDemod.stop();
|
||||||
}
|
}
|
||||||
else if (_demod == DEMOD_LSB) {
|
else if (_demod == DEMOD_LSB) {
|
||||||
|
agc.stop();
|
||||||
ssbDemod.stop();
|
ssbDemod.stop();
|
||||||
}
|
}
|
||||||
else if (_demod == DEMOD_DSB) {
|
else if (_demod == DEMOD_DSB) {
|
||||||
|
agc.stop();
|
||||||
ssbDemod.stop();
|
ssbDemod.stop();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -139,6 +142,7 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
else if (demId == DEMOD_AM) {
|
else if (demId == DEMOD_AM) {
|
||||||
demodOutputSamplerate = 125000;
|
demodOutputSamplerate = 125000;
|
||||||
vfo->setSampleRate(12500, bandwidth);
|
vfo->setSampleRate(12500, bandwidth);
|
||||||
|
agc.setInput(&amDemod.out);
|
||||||
audioResamp.setInput(&agc.out);
|
audioResamp.setInput(&agc.out);
|
||||||
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
||||||
|
|
||||||
@ -157,7 +161,8 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
demodOutputSamplerate = 6000;
|
demodOutputSamplerate = 6000;
|
||||||
vfo->setSampleRate(6000, bandwidth);
|
vfo->setSampleRate(6000, bandwidth);
|
||||||
ssbDemod.setMode(dsp::SSBDemod::MODE_USB);
|
ssbDemod.setMode(dsp::SSBDemod::MODE_USB);
|
||||||
audioResamp.setInput(&ssbDemod.out);
|
agc.setInput(&ssbDemod.out);
|
||||||
|
audioResamp.setInput(&agc.out);
|
||||||
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
||||||
|
|
||||||
audioResamp.setInSampleRate(6000);
|
audioResamp.setInSampleRate(6000);
|
||||||
@ -168,13 +173,15 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
|
|
||||||
deemp.bypass = true;
|
deemp.bypass = true;
|
||||||
vfo->setReference(ImGui::WaterfallVFO::REF_LOWER);
|
vfo->setReference(ImGui::WaterfallVFO::REF_LOWER);
|
||||||
|
agc.start();
|
||||||
ssbDemod.start();
|
ssbDemod.start();
|
||||||
}
|
}
|
||||||
else if (demId == DEMOD_LSB) {
|
else if (demId == DEMOD_LSB) {
|
||||||
demodOutputSamplerate = 6000;
|
demodOutputSamplerate = 6000;
|
||||||
vfo->setSampleRate(6000, bandwidth);
|
vfo->setSampleRate(6000, bandwidth);
|
||||||
ssbDemod.setMode(dsp::SSBDemod::MODE_LSB);
|
ssbDemod.setMode(dsp::SSBDemod::MODE_LSB);
|
||||||
audioResamp.setInput(&ssbDemod.out);
|
agc.setInput(&ssbDemod.out);
|
||||||
|
audioResamp.setInput(&agc.out);
|
||||||
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
||||||
|
|
||||||
audioResamp.setInSampleRate(6000);
|
audioResamp.setInSampleRate(6000);
|
||||||
@ -185,13 +192,15 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
|
|
||||||
deemp.bypass = true;
|
deemp.bypass = true;
|
||||||
vfo->setReference(ImGui::WaterfallVFO::REF_UPPER);
|
vfo->setReference(ImGui::WaterfallVFO::REF_UPPER);
|
||||||
|
agc.start();
|
||||||
ssbDemod.start();
|
ssbDemod.start();
|
||||||
}
|
}
|
||||||
else if (demId == DEMOD_DSB) {
|
else if (demId == DEMOD_DSB) {
|
||||||
demodOutputSamplerate = 6000;
|
demodOutputSamplerate = 6000;
|
||||||
vfo->setSampleRate(6000, bandwidth);
|
vfo->setSampleRate(6000, bandwidth);
|
||||||
ssbDemod.setMode(dsp::SSBDemod::MODE_DSB);
|
ssbDemod.setMode(dsp::SSBDemod::MODE_DSB);
|
||||||
audioResamp.setInput(&ssbDemod.out);
|
agc.setInput(&ssbDemod.out);
|
||||||
|
audioResamp.setInput(&agc.out);
|
||||||
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
audioBw = std::min<float>(bandwidth, outputSampleRate / 2.0f);
|
||||||
|
|
||||||
audioResamp.setInSampleRate(6000);
|
audioResamp.setInSampleRate(6000);
|
||||||
@ -202,6 +211,7 @@ void SigPath::setDemodulator(int demId, float bandWidth) {
|
|||||||
|
|
||||||
deemp.bypass = true;
|
deemp.bypass = true;
|
||||||
vfo->setReference(ImGui::WaterfallVFO::REF_CENTER);
|
vfo->setReference(ImGui::WaterfallVFO::REF_CENTER);
|
||||||
|
agc.start();
|
||||||
ssbDemod.start();
|
ssbDemod.start();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -21,10 +21,11 @@
|
|||||||
"fftHeight": 296,
|
"fftHeight": 296,
|
||||||
"frequency": 99000000,
|
"frequency": 99000000,
|
||||||
"max": 0.0,
|
"max": 0.0,
|
||||||
"maximized": false,
|
"maximized": true,
|
||||||
"menuOrder": [
|
"menuOrder": [
|
||||||
"Source",
|
"Source",
|
||||||
"Radio",
|
"Radio 1",
|
||||||
|
"Radio 2",
|
||||||
"Recorder",
|
"Recorder",
|
||||||
"Sinks",
|
"Sinks",
|
||||||
"Audio",
|
"Audio",
|
||||||
@ -33,16 +34,26 @@
|
|||||||
"Display"
|
"Display"
|
||||||
],
|
],
|
||||||
"menuWidth": 300,
|
"menuWidth": 300,
|
||||||
"min": -70.5882339477539,
|
"min": -53.676475524902344,
|
||||||
"offset": 0.0,
|
"offset": 0.0,
|
||||||
"showWaterfall": true,
|
"showWaterfall": true,
|
||||||
"source": "PlutoSDR",
|
"source": "SoapySDR",
|
||||||
"sourceSettings": {},
|
"sourceSettings": {},
|
||||||
"streams": {
|
"streams": {
|
||||||
"Radio": {
|
"Radio": {
|
||||||
|
"muted": false,
|
||||||
|
"sink": "Audio",
|
||||||
|
"volume": 0.5306122303009033
|
||||||
|
},
|
||||||
|
"Radio 1": {
|
||||||
"muted": true,
|
"muted": true,
|
||||||
"sink": "Audio",
|
"sink": "Audio",
|
||||||
"volume": 0.65625
|
"volume": 0.625
|
||||||
|
},
|
||||||
|
"Radio 2": {
|
||||||
|
"muted": false,
|
||||||
|
"sink": "Audio",
|
||||||
|
"volume": 1.0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"windowSize": {
|
"windowSize": {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"Radio": "./radio/Release/radio.dll",
|
"Radio 1": "./radio/Release/radio.dll",
|
||||||
|
"Radio 2": "./radio/Release/radio.dll",
|
||||||
"Recorder": "./recorder/Release/recorder.dll",
|
"Recorder": "./recorder/Release/recorder.dll",
|
||||||
"Soapy": "./soapy/Release/soapy.dll",
|
"Soapy": "./soapy/Release/soapy.dll",
|
||||||
"RTLTCPSource": "./rtl_tcp_source/Release/rtl_tcp_source.dll",
|
"RTLTCPSource": "./rtl_tcp_source/Release/rtl_tcp_source.dll",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"device": "Generic RTL2832U OEM :: 00000001",
|
"device": "HackRF One #0 901868dc282c8f8b",
|
||||||
"devices": {
|
"devices": {
|
||||||
"": {
|
"": {
|
||||||
"gains": {
|
"gains": {
|
||||||
@ -29,10 +29,10 @@
|
|||||||
"HackRF One #0 901868dc282c8f8b": {
|
"HackRF One #0 901868dc282c8f8b": {
|
||||||
"gains": {
|
"gains": {
|
||||||
"AMP": 0.0,
|
"AMP": 0.0,
|
||||||
"LNA": 24.711999893188477,
|
"LNA": 23.415000915527344,
|
||||||
"VGA": 21.749000549316406
|
"VGA": 16.332000732421875
|
||||||
},
|
},
|
||||||
"sampleRate": 2000000.0
|
"sampleRate": 8000000.0
|
||||||
},
|
},
|
||||||
"Microphone (Realtek High Definition Audio)": {
|
"Microphone (Realtek High Definition Audio)": {
|
||||||
"sampleRate": 96000.0
|
"sampleRate": 96000.0
|
||||||
|
Loading…
Reference in New Issue
Block a user