GUI: run per-chan osc on instrument preview
This commit is contained in:
parent
4dfd413ead
commit
9fee9fa363
|
@ -1743,6 +1743,10 @@ bool DivEngine::isPlaying() {
|
||||||
return (playing && !freelance);
|
return (playing && !freelance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DivEngine::isRunning() {
|
||||||
|
return playing;
|
||||||
|
}
|
||||||
|
|
||||||
bool DivEngine::isStepping() {
|
bool DivEngine::isStepping() {
|
||||||
return !(stepPlay==0);
|
return !(stepPlay==0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,6 +654,9 @@ class DivEngine {
|
||||||
|
|
||||||
// is playing
|
// is playing
|
||||||
bool isPlaying();
|
bool isPlaying();
|
||||||
|
|
||||||
|
// is running
|
||||||
|
bool isRunning();
|
||||||
|
|
||||||
// is stepping
|
// is stepping
|
||||||
bool isStepping();
|
bool isStepping();
|
||||||
|
|
|
@ -312,7 +312,7 @@ void FurnaceGUI::drawChanOsc() {
|
||||||
inRect.Max.y-=dpiScale;
|
inRect.Max.y-=dpiScale;
|
||||||
ImGui::ItemSize(size,style.FramePadding.y);
|
ImGui::ItemSize(size,style.FramePadding.y);
|
||||||
if (ImGui::ItemAdd(rect,ImGui::GetID("chOscDisplay"))) {
|
if (ImGui::ItemAdd(rect,ImGui::GetID("chOscDisplay"))) {
|
||||||
if (!e->isPlaying()) {
|
if (!e->isRunning()) {
|
||||||
for (unsigned short i=0; i<512; i++) {
|
for (unsigned short i=0; i<512; i++) {
|
||||||
float x=(float)i/512.0f;
|
float x=(float)i/512.0f;
|
||||||
waveform[i]=ImLerp(inRect.Min,inRect.Max,ImVec2(x,0.5f));
|
waveform[i]=ImLerp(inRect.Min,inRect.Max,ImVec2(x,0.5f));
|
||||||
|
|
Loading…
Reference in a new issue