mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
GUI: reduce initial oscilloscope latency
This commit is contained in:
parent
463090717b
commit
9baa261253
1 changed files with 3 additions and 3 deletions
|
@ -19,18 +19,18 @@
|
|||
|
||||
#include "gui.h"
|
||||
#include "imgui_internal.h"
|
||||
#include <imgui.h>
|
||||
#include <math.h>
|
||||
|
||||
// TODO:
|
||||
// - potentially move oscilloscope seek position to the end, and read the last samples
|
||||
// - this allows for setting up the window size
|
||||
// - reduce initial latency (it's too high)
|
||||
void FurnaceGUI::readOsc() {
|
||||
int writePos=e->oscWritePos;
|
||||
int readPos=e->oscReadPos;
|
||||
int avail=0;
|
||||
int total=0;
|
||||
if (firstFrame) {
|
||||
readPos=writePos;
|
||||
}
|
||||
if (writePos>=readPos) {
|
||||
avail=writePos-readPos;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue