GUI: add an FM preview

currently for OPN only
This commit is contained in:
tildearrow 2023-03-18 04:22:50 -05:00
parent 57f4cc8561
commit 09a30570de
7 changed files with 141 additions and 82 deletions

View file

@ -520,10 +520,6 @@ void FurnaceGUI::drawDebug() {
ImGui::TreePop();
}
if (ImGui::TreeNode("FM Preview")) {
if (ImGui::Button("Generate")) {
DivInstrument* ins=e->getIns(curIns);
if (ins!=NULL) renderFMPreview(ins->fm);
}
float asFloat[FM_PREVIEW_SIZE];
for (int i=0; i<FM_PREVIEW_SIZE; i++) {
asFloat[i]=(float)fmPreview[i]/8192.0f;