diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index af011622..1d617355 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -1800,7 +1800,7 @@ void DivPlatformOPL::setFlags(unsigned int flags) { break; } - for (int i=0; i<18; i++) { + for (int i=0; i<20; i++) { 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++) { isMuted[i]=false; } - for (int i=0; i<18; i++) { + for (int i=0; i<20; i++) { oscBuf[i]=new DivDispatchOscBuffer; } setFlags(flags); @@ -1869,7 +1869,7 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, unsigned int f } void DivPlatformOPL::quit() { - for (int i=0; i<18; i++) { + for (int i=0; i<20; i++) { delete oscBuf[i]; } if (adpcmChan>=0) { diff --git a/src/engine/platform/opl.h b/src/engine/platform/opl.h index 5e8294c3..e949c47f 100644 --- a/src/engine/platform/opl.h +++ b/src/engine/platform/opl.h @@ -75,7 +75,7 @@ class DivPlatformOPL: public DivDispatch { } }; Channel chan[20]; - DivDispatchOscBuffer* oscBuf[18]; + DivDispatchOscBuffer* oscBuf[20]; bool isMuted[20]; struct QueuedWrite { unsigned short addr;