GUI: add audio want/got details

This commit is contained in:
tildearrow 2022-02-05 21:26:24 -05:00
parent 045dfa679a
commit fe47a2ba09
3 changed files with 20 additions and 0 deletions

View file

@ -5952,6 +5952,14 @@ void DivEngine::switchMaster() {
} }
} }
TAAudioDesc& DivEngine::getAudioDescWant() {
return want;
}
TAAudioDesc& DivEngine::getAudioDescGot() {
return got;
}
void DivEngine::initDispatch() { void DivEngine::initDispatch() {
isBusy.lock(); isBusy.lock();
for (int i=0; i<song.systemLen; i++) { for (int i=0; i<song.systemLen; i++) {

View file

@ -536,6 +536,12 @@ class DivEngine {
// switch master // switch master
void switchMaster(); void switchMaster();
// get audio desc want
TAAudioDesc& getAudioDescWant();
// get audio desc
TAAudioDesc& getAudioDescGot();
// init dispatch // init dispatch
void initDispatch(); void initDispatch();

View file

@ -3236,6 +3236,12 @@ void FurnaceGUI::drawSettings() {
settings.forceMono=forceMonoB; settings.forceMono=forceMonoB;
} }
TAAudioDesc& audioWant=e->getAudioDescWant();
TAAudioDesc& audioGot=e->getAudioDescGot();
ImGui::Text("want: %d samples @ %.0fHz\n",audioWant.bufsize,audioWant.rate);
ImGui::Text("got: %d samples @ %.0fHz\n",audioGot.bufsize,audioGot.rate);
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Emulation")) { if (ImGui::BeginTabItem("Emulation")) {