mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 23:13:01 +00:00
OPL: fix crash
This commit is contained in:
parent
6fe7e638d5
commit
0a055ff85b
2 changed files with 4 additions and 4 deletions
|
@ -1800,7 +1800,7 @@ void DivPlatformOPL::setFlags(unsigned int flags) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<18; i++) {
|
for (int i=0; i<20; i++) {
|
||||||
oscBuf[i]->rate=rate;
|
oscBuf[i]->rate=rate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1851,7 +1851,7 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, unsigned int f
|
||||||
for (int i=0; i<20; i++) {
|
for (int i=0; i<20; i++) {
|
||||||
isMuted[i]=false;
|
isMuted[i]=false;
|
||||||
}
|
}
|
||||||
for (int i=0; i<18; i++) {
|
for (int i=0; i<20; i++) {
|
||||||
oscBuf[i]=new DivDispatchOscBuffer;
|
oscBuf[i]=new DivDispatchOscBuffer;
|
||||||
}
|
}
|
||||||
setFlags(flags);
|
setFlags(flags);
|
||||||
|
@ -1869,7 +1869,7 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, unsigned int f
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformOPL::quit() {
|
void DivPlatformOPL::quit() {
|
||||||
for (int i=0; i<18; i++) {
|
for (int i=0; i<20; i++) {
|
||||||
delete oscBuf[i];
|
delete oscBuf[i];
|
||||||
}
|
}
|
||||||
if (adpcmChan>=0) {
|
if (adpcmChan>=0) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ class DivPlatformOPL: public DivDispatch {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Channel chan[20];
|
Channel chan[20];
|
||||||
DivDispatchOscBuffer* oscBuf[18];
|
DivDispatchOscBuffer* oscBuf[20];
|
||||||
bool isMuted[20];
|
bool isMuted[20];
|
||||||
struct QueuedWrite {
|
struct QueuedWrite {
|
||||||
unsigned short addr;
|
unsigned short addr;
|
||||||
|
|
Loading…
Reference in a new issue