parent
4dd935bbcc
commit
c8f57afda4
|
@ -999,9 +999,21 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
||||||
if (s->depth==8) samp_temp<<=8;
|
if (s->depth==8) samp_temp<<=8;
|
||||||
blip_add_delta(samp_bb,i,samp_temp-samp_prevSample);
|
blip_add_delta(samp_bb,i,samp_temp-samp_prevSample);
|
||||||
samp_prevSample=samp_temp;
|
samp_prevSample=samp_temp;
|
||||||
|
|
||||||
|
if (sPreview.pos>=s->rendLength) {
|
||||||
|
if (s->loopStart>=0 && s->loopStart<(int)s->rendLength) {
|
||||||
|
sPreview.pos=s->loopStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sPreview.pos>=s->rendLength) sPreview.sample=-1;
|
if (sPreview.pos>=s->rendLength) {
|
||||||
|
if (s->loopStart>=0 && s->loopStart<(int)s->rendLength) {
|
||||||
|
sPreview.pos=s->loopStart;
|
||||||
|
} else {
|
||||||
|
sPreview.sample=-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (sPreview.wave>=0 && sPreview.wave<(int)song.wave.size()) {
|
} else if (sPreview.wave>=0 && sPreview.wave<(int)song.wave.size()) {
|
||||||
DivWavetable* wave=song.wave[sPreview.wave];
|
DivWavetable* wave=song.wave[sPreview.wave];
|
||||||
for (size_t i=0; i<prevtotal; i++) {
|
for (size_t i=0; i<prevtotal; i++) {
|
||||||
|
|
|
@ -2036,6 +2036,10 @@ void FurnaceGUI::drawSampleList() {
|
||||||
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) {
|
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) {
|
||||||
e->previewSample(curSample);
|
e->previewSample(curSample);
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FA_VOLUME_OFF "##StopSampleL")) {
|
||||||
|
e->stopSamplePreview();
|
||||||
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
for (int i=0; i<(int)e->song.sample.size(); i++) {
|
for (int i=0; i<(int)e->song.sample.size(); i++) {
|
||||||
DivSample* sample=e->song.sample[i];
|
DivSample* sample=e->song.sample[i];
|
||||||
|
@ -2108,6 +2112,10 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSample")) {
|
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSample")) {
|
||||||
e->previewSample(curSample);
|
e->previewSample(curSample);
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(ICON_FA_VOLUME_OFF "##StopSample")) {
|
||||||
|
e->stopSamplePreview();
|
||||||
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
bool considerations=false;
|
bool considerations=false;
|
||||||
ImGui::Text("notes:");
|
ImGui::Text("notes:");
|
||||||
|
|
Loading…
Reference in New Issue