Merge branch 'master' into es5506_alt
This commit is contained in:
commit
bf6487b8bd
Binary file not shown.
|
@ -3069,8 +3069,20 @@ DivSample* DivEngine::sampleFromFile(const char* path) {
|
|||
if (extS==".brr") {
|
||||
dataBuf=sample->dataBRR;
|
||||
if ((len%9)==2) {
|
||||
// ignore loop position
|
||||
fseek(f,2,SEEK_SET);
|
||||
// read loop position
|
||||
unsigned short loopPos=0;
|
||||
logD("BRR file has loop position");
|
||||
if (fread(&loopPos,1,2,f)!=2) {
|
||||
logW("could not read loop position! %s",strerror(errno));
|
||||
} else {
|
||||
#ifdef TA_BIG_ENDIAN
|
||||
loopPos=(loopPos>>8)|(loopPos<<8);
|
||||
#endif
|
||||
sample->loopStart=16*(loopPos/9);
|
||||
sample->loopEnd=sample->samples;
|
||||
sample->loop=true;
|
||||
sample->loopMode=DIV_SAMPLE_LOOP_FORWARD;
|
||||
}
|
||||
len-=2;
|
||||
if (len==0) {
|
||||
fclose(f);
|
||||
|
|
|
@ -70,6 +70,7 @@ const char* aboutLine[]={
|
|||
"DeMOSic",
|
||||
"DevEd",
|
||||
"Dippy",
|
||||
"FΛDE",
|
||||
"Forte",
|
||||
"Fragmare",
|
||||
"freq-mod",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -128,7 +128,9 @@ void FurnaceGUI::drawNewSong() {
|
|||
if (newSystemCat->systems.size()==0) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
} else {
|
||||
nextDesc=newSystemCat->systems[rand()%newSystemCat->systems.size()].definition.data();
|
||||
unsigned int selection=rand()%newSystemCat->systems.size();
|
||||
nextDesc=newSystemCat->systems[selection].definition.data();
|
||||
nextDescName=newSystemCat->systems[selection].name;
|
||||
accepted=true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -369,14 +369,27 @@ void FurnaceGUI::drawPiano() {
|
|||
pianoOptions=!pianoOptions;
|
||||
}
|
||||
|
||||
// TODO: wave and sample preview
|
||||
// first check released keys
|
||||
for (int i=0; i<180; i++) {
|
||||
int note=i-60;
|
||||
if (!pianoKeyPressed[i]) {
|
||||
if (pianoKeyPressed[i]!=oldPianoKeyPressed[i]) {
|
||||
e->synchronized([this,note]() {
|
||||
e->autoNoteOff(-1,note);
|
||||
});
|
||||
switch (curWindow) {
|
||||
case GUI_WINDOW_WAVE_LIST:
|
||||
case GUI_WINDOW_WAVE_EDIT:
|
||||
e->stopWavePreview();
|
||||
break;
|
||||
case GUI_WINDOW_SAMPLE_LIST:
|
||||
case GUI_WINDOW_SAMPLE_EDIT:
|
||||
e->stopSamplePreview();
|
||||
break;
|
||||
default:
|
||||
e->synchronized([this,note]() {
|
||||
e->autoNoteOff(-1,note);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -385,10 +398,22 @@ void FurnaceGUI::drawPiano() {
|
|||
int note=i-60;
|
||||
if (pianoKeyPressed[i]) {
|
||||
if (pianoKeyPressed[i]!=oldPianoKeyPressed[i]) {
|
||||
e->synchronized([this,note]() {
|
||||
e->autoNoteOn(-1,curIns,note);
|
||||
});
|
||||
if (edit) noteInput(note,0);
|
||||
switch (curWindow) {
|
||||
case GUI_WINDOW_WAVE_LIST:
|
||||
case GUI_WINDOW_WAVE_EDIT:
|
||||
e->previewWave(curWave,note);
|
||||
break;
|
||||
case GUI_WINDOW_SAMPLE_LIST:
|
||||
case GUI_WINDOW_SAMPLE_EDIT:
|
||||
e->previewSample(curWave,note);
|
||||
break;
|
||||
default:
|
||||
e->synchronized([this,note]() {
|
||||
e->autoNoteOn(-1,curIns,note);
|
||||
});
|
||||
if (edit) noteInput(note,0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +422,8 @@ void FurnaceGUI::drawPiano() {
|
|||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PIANO;
|
||||
// don't worry about it
|
||||
//if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PIANO;
|
||||
ImGui::End();
|
||||
|
||||
// draw input pad if necessary
|
||||
|
@ -458,7 +484,8 @@ void FurnaceGUI::drawPiano() {
|
|||
}
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PIANO;
|
||||
// don't worry about it either
|
||||
//if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_PIANO;
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
|
1012
src/gui/presets.cpp
1012
src/gui/presets.cpp
File diff suppressed because it is too large
Load Diff
|
@ -3344,7 +3344,9 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((bigFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(font_plexSans_compressed_data,font_plexSans_compressed_size,40*dpiScale))==NULL) {
|
||||
// 0x39B = Λ
|
||||
static const ImWchar bigFontRange[]={0x20,0xFF,0x39b,0x39b,0};
|
||||
if ((bigFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(font_plexSans_compressed_data,font_plexSans_compressed_size,40*dpiScale,NULL,bigFontRange))==NULL) {
|
||||
logE("could not load big UI font!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue