Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt

* 'master' of https://github.com/tildearrow/furnace:
  sysDef refactor, part 2
  sysDef refactor, part 1 - PLEASE READ NOTE
  prepare for macroInt preview in instrument editor
  GUI: fix #400
  fix metronome in low-latency mode

# Conflicts:
#	src/engine/dispatch.h
#	src/engine/dispatchContainer.cpp
#	src/engine/instrument.h
#	src/engine/song.h
#	src/engine/sysDef.cpp
#	src/gui/dataList.cpp
#	src/gui/gui.h
#	src/gui/guiConst.cpp
This commit is contained in:
cam900 2022-04-27 19:52:04 +09:00
commit 0209ebda03
22 changed files with 1333 additions and 1591 deletions

View file

@ -1470,6 +1470,10 @@ bool DivEngine::addWaveFromFile(const char* path) {
fclose(f);
return false;
}
if (len==(SIZE_MAX>>1)) {
fclose(f);
return false;
}
if (len==0) {
fclose(f);
return false;
@ -1662,6 +1666,14 @@ int DivEngine::addSampleFromFile(const char* path) {
return -1;
}
if (len==(SIZE_MAX>>1)) {
fclose(f);
BUSY_END;
lastError="file is invalid!";
delete sample;
return -1;
}
if (fseek(f,0,SEEK_SET)<0) {
fclose(f);
BUSY_END;
@ -2457,6 +2469,9 @@ bool DivEngine::deinitAudioBackend() {
#endif
bool DivEngine::init() {
// register systems
if (!systemsRegistered) registerSystems();
// init config
#ifdef _WIN32
configPath=getWinConfigPath();