what is going on

This commit is contained in:
tildearrow 2022-03-23 17:00:40 -05:00
parent 6492eeff56
commit 11d9ce3f87

View file

@ -2148,7 +2148,12 @@ int DivEngine::addSampleFromFile(const char* path) {
SNDFILE* f=sf_open(path,SFM_READ,&si); SNDFILE* f=sf_open(path,SFM_READ,&si);
if (f==NULL) { if (f==NULL) {
isBusy.unlock(); isBusy.unlock();
lastError=fmt::sprintf("could not open file! (%s)",sf_error_number(sf_error(NULL))); int err=sf_error(NULL);
if (err==SF_ERR_SYSTEM) {
lastError=fmt::sprintf("could not open file! (%s %s)",sf_error_number(err),strerror(errno));
} else {
lastError=fmt::sprintf("could not open file! (%s)",sf_error_number(err));
}
return -1; return -1;
} }
if (si.frames>16777215) { if (si.frames>16777215) {