mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-03-27 01:45:28 +01:00
trying to fix underrun when switching sdr
This commit is contained in:
parent
48df92c8a5
commit
6a01c9d426
@ -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 * 2);
|
stereoRB.data.setMaxLatency(bufferSize * 3);
|
||||||
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 * 2);
|
monoRB.data.setMaxLatency(bufferSize * 3);
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -155,23 +155,24 @@ int sdrpp_main() {
|
|||||||
|
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// // glfwPollEvents();
|
glfwPollEvents();
|
||||||
// ImGui_ImplOpenGL3_NewFrame();
|
ImGui_ImplOpenGL3_NewFrame();
|
||||||
// // ImGui_ImplGlfw_NewFrame();
|
ImGui_ImplGlfw_NewFrame();
|
||||||
// // ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
// // ImGui::ShowDemoWindow();
|
ImGui::Begin("Main", NULL, WINDOW_FLAGS);
|
||||||
|
ImGui::ShowDemoWindow();
|
||||||
|
ImGui::End();
|
||||||
|
|
||||||
// // ImGui::Render();
|
ImGui::Render();
|
||||||
// int display_w, display_h;
|
int display_w, display_h;
|
||||||
// glfwGetFramebufferSize(window, &display_w, &display_h);
|
glfwGetFramebufferSize(window, &display_w, &display_h);
|
||||||
// glViewport(0, 0, display_w, display_h);
|
glViewport(0, 0, display_w, display_h);
|
||||||
// glClearColor(0.0666f, 0.0666f, 0.0666f, 1.0f);
|
glClearColor(0.0666f, 0.0666f, 0.0666f, 1.0f);
|
||||||
// //glClearColor(0.9f, 0.9f, 0.9f, 1.0f);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
// glClear(GL_COLOR_BUFFER_BIT);
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
// // ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
|
||||||
|
|
||||||
// glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
spdlog::info("Loading icons");
|
spdlog::info("Loading icons");
|
||||||
|
@ -119,17 +119,14 @@ void windowInit() {
|
|||||||
bandplanmenu::init();
|
bandplanmenu::init();
|
||||||
displaymenu::init();
|
displaymenu::init();
|
||||||
|
|
||||||
// Load last source configuration
|
// TODO for 0.2.5
|
||||||
// Also add a loading screen
|
// Add a loading screen
|
||||||
// Adjustable "snap to grid" for each VFO
|
// Add "select folder" option for the recorder module
|
||||||
// Finish the recorder module
|
|
||||||
// Add squelsh
|
// Add squelsh
|
||||||
// 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
|
|
||||||
// Do VFO in two steps: First sample rate conversion, then filtering
|
|
||||||
|
|
||||||
|
// TODO for 0.2.6
|
||||||
// And a module add/remove/change order menu
|
// And a module add/remove/change order menu
|
||||||
|
|
||||||
// Update UI settings
|
// Update UI settings
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"Radio": "./radio/Release/radio.dll",
|
"Radio": "./radio/RelWithDebInfo/radio.dll",
|
||||||
"Recorder": "./recorder/Release/recorder.dll",
|
"Recorder": "./recorder/RelWithDebInfo/recorder.dll",
|
||||||
"Soapy": "./soapy/Release/soapy.dll",
|
"Soapy": "./soapy/RelWithDebInfo/soapy.dll",
|
||||||
"RTLTCPSource": "./rtl_tcp_source/Release/rtl_tcp_source.dll",
|
"RTLTCPSource": "./rtl_tcp_source/RelWithDebInfo/rtl_tcp_source.dll",
|
||||||
"FileSource": "./file_source/Release/file_source.dll",
|
"FileSource": "./file_source/RelWithDebInfo/file_source.dll",
|
||||||
"RX888Source": "./rx888_source/Release/rx888_source.dll",
|
"RX888Source": "./rx888_source/RelWithDebInfo/rx888_source.dll",
|
||||||
"PlutoSDRSource": "./plutosdr_source/Release/plutosdr_source.dll",
|
"PlutoSDRSource": "./plutosdr_source/RelWithDebInfo/plutosdr_source.dll",
|
||||||
"AudioSink": "./audio_sink/Release/audio_sink.dll"
|
"AudioSink": "./audio_sink/RelWithDebInfo/audio_sink.dll"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user