breaking the limit, part 2

all dispatches adapted to 32768 samples.
sample limit unlocked.
testing is required.
This commit is contained in:
tildearrow 2025-07-27 20:16:59 -05:00
parent a4da787c1b
commit 387d9e0654
47 changed files with 430 additions and 168 deletions

View file

@ -531,7 +531,7 @@ size_t DivPlatformNDS::getSampleMemUsage(int index) {
bool DivPlatformNDS::isSampleLoaded(int index, int sample) {
if (index!=0) return false;
if (sample<0 || sample>255) return false;
if (sample<0 || sample>32767) return false;
return sampleLoaded[sample];
}
@ -542,8 +542,8 @@ const DivMemoryComposition* DivPlatformNDS::getMemCompo(int index) {
void DivPlatformNDS::renderSamples(int sysID) {
memset(sampleMem,0,16777216);
memset(sampleOff,0,256*sizeof(unsigned int));
memset(sampleLoaded,0,256*sizeof(bool));
memset(sampleOff,0,32768*sizeof(unsigned int));
memset(sampleLoaded,0,32768*sizeof(bool));
memCompo=DivMemoryComposition();
memCompo.name="Main Memory";
@ -629,3 +629,17 @@ void DivPlatformNDS::quit() {
delete oscBuf[i];
}
}
// initialization of important arrays
DivPlatformNDS::DivPlatformNDS():
DivDispatch(),
nds_sound_intf(),
nds(*this) {
sampleOff=new unsigned int[32768];
sampleLoaded=new bool[32768];
}
DivPlatformNDS::~DivPlatformNDS() {
delete[] sampleOff;
delete[] sampleLoaded;
}