Reverted some unnecesary things

This commit is contained in:
KiritoDv 2024-12-24 23:16:11 -06:00 committed by Lywx
parent f40105e778
commit fc245b2292
2 changed files with 12 additions and 13 deletions

View File

@ -145,6 +145,7 @@ void AudioSeq_SeqLayerDisable(SequenceLayer* layer) {
} }
void AudioSeq_SeqLayerFree(SequenceChannel* channel, s32 layerIndex) { void AudioSeq_SeqLayerFree(SequenceChannel* channel, s32 layerIndex) {
if (layerIndex < 4) {
SequenceLayer* layer = channel->layers[layerIndex]; SequenceLayer* layer = channel->layers[layerIndex];
if (layer != NULL) { if (layer != NULL) {
@ -153,6 +154,7 @@ void AudioSeq_SeqLayerFree(SequenceChannel* channel, s32 layerIndex) {
channel->layers[layerIndex] = NULL; channel->layers[layerIndex] = NULL;
} }
} }
}
void AudioSeq_SequenceChannelDisable(SequenceChannel* channel) { void AudioSeq_SequenceChannelDisable(SequenceChannel* channel) {
s32 i; s32 i;

View File

@ -888,7 +888,6 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisSta
s32 dmemUncompressedAddrOffset1; s32 dmemUncompressedAddrOffset1;
u32 sampleslenFixedPoint; u32 sampleslenFixedPoint;
u8* samplesToLoadAddr; u8* samplesToLoadAddr;
uintptr_t buffAddr;
s32 gain; s32 gain;
u32 nEntries; u32 nEntries;
s32 aligned; s32 aligned;
@ -933,7 +932,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisSta
noteSamplesDmemAddrBeforeResampling = DMEM_UNCOMPRESSED_NOTE + (synthState->samplePosInt * SAMPLE_SIZE); noteSamplesDmemAddrBeforeResampling = DMEM_UNCOMPRESSED_NOTE + (synthState->samplePosInt * SAMPLE_SIZE);
synthState->samplePosInt += numSamplesToLoad; synthState->samplePosInt += numSamplesToLoad;
} else { } else {
bookSample = *((Sample**) noteSub->waveSampleAddr); bookSample = *(noteSub->waveSampleAddr);
loopInfo = bookSample->loop; loopInfo = bookSample->loop;
endPos = loopInfo->end; endPos = loopInfo->end;
@ -1166,10 +1165,9 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisSta
case 2: case 2:
switch (curPart) { switch (curPart) {
case 0: case 0:
aInterl(aList++, skipBytes + DMEM_UNCOMPRESSED_NOTE, aInterl(aList++, skipBytes + DMEM_UNCOMPRESSED_NOTE, DMEM_WET_SCRATCH, ALIGN8(numSamplesToLoadAdj / 2));
DMEM_TEMP + (SAMPLES_PER_FRAME * SAMPLE_SIZE), ALIGN8(numSamplesToLoadAdj / 2));
resampledTempLen = numSamplesToLoadAdj; resampledTempLen = numSamplesToLoadAdj;
noteSamplesDmemAddrBeforeResampling = DMEM_TEMP + (SAMPLES_PER_FRAME * SAMPLE_SIZE); noteSamplesDmemAddrBeforeResampling = DMEM_WET_SCRATCH;
if (noteSub->bitField0.finished) { if (noteSub->bitField0.finished) {
aClearBuffer(aList++, resampledTempLen + noteSamplesDmemAddrBeforeResampling, aClearBuffer(aList++, resampledTempLen + noteSamplesDmemAddrBeforeResampling,
numSamplesToLoadAdj + SAMPLES_PER_FRAME); numSamplesToLoadAdj + SAMPLES_PER_FRAME);
@ -1177,8 +1175,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisSta
break; break;
case 1: case 1:
aInterl(aList++, skipBytes + DMEM_UNCOMPRESSED_NOTE, aInterl(aList++, skipBytes + DMEM_UNCOMPRESSED_NOTE, resampledTempLen + DMEM_WET_SCRATCH,
resampledTempLen + DMEM_TEMP + (SAMPLES_PER_FRAME * SAMPLE_SIZE),
ALIGN8(numSamplesToLoadAdj / 2)); ALIGN8(numSamplesToLoadAdj / 2));
break; break;
} }