mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-24 01:48: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;
|
||||
|
||||
if (dev->channels == 2) {
|
||||
stereoRB.data.setMaxLatency(bufferSize * 2);
|
||||
stereoRB.data.setMaxLatency(bufferSize * 3);
|
||||
stereoRB.start();
|
||||
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _stereo_cb, this);
|
||||
}
|
||||
else {
|
||||
monoRB.data.setMaxLatency(bufferSize * 2);
|
||||
monoRB.data.setMaxLatency(bufferSize * 3);
|
||||
monoRB.start();
|
||||
err = Pa_OpenStream(&stream, NULL, &outputParams, sampleRate, bufferSize, 0, _mono_cb, this);
|
||||
}
|
||||
|
@ -155,23 +155,24 @@ int sdrpp_main() {
|
||||
|
||||
|
||||
// ====================================================
|
||||
// // glfwPollEvents();
|
||||
// ImGui_ImplOpenGL3_NewFrame();
|
||||
// // ImGui_ImplGlfw_NewFrame();
|
||||
// // ImGui::NewFrame();
|
||||
glfwPollEvents();
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
// // ImGui::ShowDemoWindow();
|
||||
ImGui::Begin("Main", NULL, WINDOW_FLAGS);
|
||||
ImGui::ShowDemoWindow();
|
||||
ImGui::End();
|
||||
|
||||
// // 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());
|
||||
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);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
// glfwSwapBuffers(window);
|
||||
glfwSwapBuffers(window);
|
||||
// ====================================================
|
||||
|
||||
spdlog::info("Loading icons");
|
||||
|
@ -119,17 +119,14 @@ void windowInit() {
|
||||
bandplanmenu::init();
|
||||
displaymenu::init();
|
||||
|
||||
// Load last source configuration
|
||||
// Also add a loading screen
|
||||
// Adjustable "snap to grid" for each VFO
|
||||
// Finish the recorder module
|
||||
// TODO for 0.2.5
|
||||
// Add a loading screen
|
||||
// Add "select folder" option for the recorder module
|
||||
// Add squelsh
|
||||
// Bandwidth ajustment
|
||||
// CW and RAW modes;
|
||||
// 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
|
||||
|
||||
// Update UI settings
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"Radio": "./radio/Release/radio.dll",
|
||||
"Recorder": "./recorder/Release/recorder.dll",
|
||||
"Soapy": "./soapy/Release/soapy.dll",
|
||||
"RTLTCPSource": "./rtl_tcp_source/Release/rtl_tcp_source.dll",
|
||||
"FileSource": "./file_source/Release/file_source.dll",
|
||||
"RX888Source": "./rx888_source/Release/rx888_source.dll",
|
||||
"PlutoSDRSource": "./plutosdr_source/Release/plutosdr_source.dll",
|
||||
"AudioSink": "./audio_sink/Release/audio_sink.dll"
|
||||
"Radio": "./radio/RelWithDebInfo/radio.dll",
|
||||
"Recorder": "./recorder/RelWithDebInfo/recorder.dll",
|
||||
"Soapy": "./soapy/RelWithDebInfo/soapy.dll",
|
||||
"RTLTCPSource": "./rtl_tcp_source/RelWithDebInfo/rtl_tcp_source.dll",
|
||||
"FileSource": "./file_source/RelWithDebInfo/file_source.dll",
|
||||
"RX888Source": "./rx888_source/RelWithDebInfo/rx888_source.dll",
|
||||
"PlutoSDRSource": "./plutosdr_source/RelWithDebInfo/plutosdr_source.dll",
|
||||
"AudioSink": "./audio_sink/RelWithDebInfo/audio_sink.dll"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user