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

@ -690,7 +690,7 @@ size_t DivPlatformSoundUnit::getSampleMemUsage(int index) {
bool DivPlatformSoundUnit::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];
}
@ -701,8 +701,8 @@ const DivMemoryComposition* DivPlatformSoundUnit::getMemCompo(int index) {
void DivPlatformSoundUnit::renderSamples(int sysID) {
memset(sampleMem,0,sampleMemSize?65536:8192);
memset(sampleOffSU,0,256*sizeof(unsigned int));
memset(sampleLoaded,0,256*sizeof(bool));
memset(sampleOffSU,0,32768*sizeof(unsigned int));
memset(sampleLoaded,0,32768*sizeof(bool));
memCompo=DivMemoryComposition();
memCompo.name="Sample RAM";
@ -770,5 +770,13 @@ void DivPlatformSoundUnit::quit() {
delete[] sampleMem;
}
DivPlatformSoundUnit::~DivPlatformSoundUnit() {
// initialization of important arrays
DivPlatformSoundUnit::DivPlatformSoundUnit() {
sampleOffSU=new unsigned int[32768];
sampleLoaded=new bool[32768];
}
DivPlatformSoundUnit::~DivPlatformSoundUnit() {
delete[] sampleOffSU;
delete[] sampleLoaded;
}