This commit is contained in:
tildearrow 2024-04-05 16:11:23 -05:00
parent 0bf0d57738
commit dc27c996fb
4 changed files with 6 additions and 3 deletions

View file

@ -397,6 +397,9 @@ DivSample* DivEngine::sampleFromFileRaw(const char* path, DivSampleDepth depth,
case DIV_SAMPLE_DEPTH_VOX:
samples=lenDivided*2;
break;
case DIV_SAMPLE_DEPTH_IMA_ADPCM:
samples=(lenDivided-4)*2;
break;
case DIV_SAMPLE_DEPTH_8BIT:
case DIV_SAMPLE_DEPTH_MULAW:
case DIV_SAMPLE_DEPTH_C219:

View file

@ -1289,7 +1289,7 @@ void DivSample::render(unsigned int formatMask) {
}
break;
case DIV_SAMPLE_DEPTH_IMA_ADPCM: // IMA ADPCM
if (adpcm_decode_block(data16,dataIMA,lengthIMA,1)==0) logE("oh crap!");
if (adpcm_decode_block(data16,dataIMA,lengthIMA,samples,1)==0) logE("oh crap!");
break;
default:
return;