mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
fix crash when exporting audio (per chip)
also fix two misc issues in ES5506 and Sound Unit
This commit is contained in:
parent
68a2c5f2f0
commit
4161dcd786
3 changed files with 5 additions and 3 deletions
|
@ -927,12 +927,13 @@ void DivEngine::runExportThread() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float* outBuf[2];
|
float* outBuf[DIV_MAX_OUTPUTS];
|
||||||
|
memset(outBuf,0,sizeof(void*)*DIV_MAX_OUTPUTS);
|
||||||
outBuf[0]=new float[EXPORT_BUFSIZE];
|
outBuf[0]=new float[EXPORT_BUFSIZE];
|
||||||
outBuf[1]=new float[EXPORT_BUFSIZE];
|
outBuf[1]=new float[EXPORT_BUFSIZE];
|
||||||
short* sysBuf[DIV_MAX_CHIPS];
|
short* sysBuf[DIV_MAX_CHIPS];
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
sysBuf[i]=new short[EXPORT_BUFSIZE*2];
|
sysBuf[i]=new short[EXPORT_BUFSIZE*disCont[i].dispatch->getOutputCount()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// take control of audio output
|
// take control of audio output
|
||||||
|
|
|
@ -1253,6 +1253,7 @@ int DivPlatformES5506::init(DivEngine* p, int channels, int sugRate, const DivCo
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
volScale=0;
|
volScale=0;
|
||||||
|
curPage=0;
|
||||||
|
|
||||||
for (int i=0; i<32; i++) {
|
for (int i=0; i<32; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
|
|
|
@ -626,7 +626,7 @@ void DivPlatformSoundUnit::quit() {
|
||||||
delete oscBuf[i];
|
delete oscBuf[i];
|
||||||
}
|
}
|
||||||
delete su;
|
delete su;
|
||||||
delete sampleMem;
|
delete[] sampleMem;
|
||||||
}
|
}
|
||||||
|
|
||||||
DivPlatformSoundUnit::~DivPlatformSoundUnit() {
|
DivPlatformSoundUnit::~DivPlatformSoundUnit() {
|
||||||
|
|
Loading…
Reference in a new issue