remove AICA and X68000 ADPCM sample types

This commit is contained in:
tildearrow 2022-05-19 04:35:39 -05:00
parent 7383a44f00
commit e63b83eeb3
4 changed files with 5 additions and 53 deletions

View File

@ -93,12 +93,6 @@ bool DivSample::initInternal(unsigned char d, int count) {
dataDPCM=new unsigned char[lengthDPCM];
memset(dataDPCM,0,lengthDPCM);
break;
case 2: // AICA ADPCM
if (dataAICA!=NULL) delete[] dataAICA;
lengthAICA=(count+1)/2;
dataAICA=new unsigned char[(lengthAICA+255)&(~0xff)];
memset(dataAICA,0,(lengthAICA+255)&(~0xff));
break;
case 3: // YMZ ADPCM
if (dataZ!=NULL) delete[] dataZ;
lengthZ=(count+1)/2;
@ -123,12 +117,6 @@ bool DivSample::initInternal(unsigned char d, int count) {
dataB=new unsigned char[(lengthB+255)&(~0xff)];
memset(dataB,0,(lengthB+255)&(~0xff));
break;
case 7: // X68000 ADPCM
if (dataX68!=NULL) delete[] dataX68;
lengthX68=(count+1)/2;
dataX68=new unsigned char[lengthX68];
memset(dataX68,0,lengthX68);
break;
case 8: // 8-bit
if (data8!=NULL) delete[] data8;
length8=count;
@ -669,9 +657,6 @@ void DivSample::render() {
}
break;
}
case 2: // AICA ADPCM
aica_decode(dataAICA,data16,samples);
break;
case 3: // YMZ ADPCM
ymz_decode(dataZ,data16,samples);
break;
@ -684,9 +669,6 @@ void DivSample::render() {
case 6: // ADPCM-B
ymb_decode(dataB,data16,samples);
break;
case 7: // X6800 ADPCM
oki6258_decode(dataX68,data16,samples);
break;
case 8: // 8-bit PCM
for (unsigned int i=0; i<samples; i++) {
data16[i]=data8[i]<<8;
@ -727,10 +709,6 @@ void DivSample::render() {
if (accum>127) accum=127;
}
}
if (depth!=2) { // AICA ADPCM
if (!initInternal(2,samples)) return;
aica_encode(data16,dataAICA,(samples+511)&(~0x1ff));
}
if (depth!=3) { // YMZ ADPCM
if (!initInternal(3,samples)) return;
ymz_encode(data16,dataZ,(samples+511)&(~0x1ff));
@ -748,10 +726,6 @@ void DivSample::render() {
if (!initInternal(6,samples)) return;
ymb_encode(data16,dataB,(samples+511)&(~0x1ff));
}
if (depth!=7) { // X68000 ADPCM
if (!initInternal(7,samples)) return;
oki6258_encode(data16,dataX68,samples);
}
if (depth!=8) { // 8-bit PCM
if (!initInternal(8,samples)) return;
for (unsigned int i=0; i<samples; i++) {
@ -771,8 +745,6 @@ void* DivSample::getCurBuf() {
return data1;
case 1:
return dataDPCM;
case 2:
return dataAICA;
case 3:
return dataZ;
case 4:
@ -781,8 +753,6 @@ void* DivSample::getCurBuf() {
return dataA;
case 6:
return dataB;
case 7:
return dataX68;
case 8:
return data8;
case 9:
@ -801,8 +771,6 @@ unsigned int DivSample::getCurBufLen() {
return length1;
case 1:
return lengthDPCM;
case 2:
return lengthAICA;
case 3:
return lengthZ;
case 4:
@ -811,8 +779,6 @@ unsigned int DivSample::getCurBufLen() {
return lengthA;
case 6:
return lengthB;
case 7:
return lengthX68;
case 8:
return length8;
case 9:
@ -915,12 +881,10 @@ DivSample::~DivSample() {
if (data16) delete[] data16;
if (data1) delete[] data1;
if (dataDPCM) delete[] dataDPCM;
if (dataAICA) delete[] dataAICA;
if (dataZ) delete[] dataZ;
if (dataQSoundA) delete[] dataQSoundA;
if (dataA) delete[] dataA;
if (dataB) delete[] dataB;
if (dataX68) delete[] dataX68;
if (dataBRR) delete[] dataBRR;
if (dataVOX) delete[] dataVOX;
}

View File

@ -62,15 +62,13 @@ struct DivSample {
// valid values are:
// - 0: ZX Spectrum overlay drum (1-bit)
// - 1: 1-bit NES DPCM (1-bit)
// - 2: AICA ADPCM
// - 3: YMZ ADPCM
// - 4: QSound ADPCM
// - 5: ADPCM-A
// - 6: ADPCM-B
// - 7: X68000 ADPCM
// - 8: 8-bit PCM
// - 9: BRR (SNES)
// - 10: VOX
// - 10: VOX ADPCM
// - 16: 16-bit PCM
unsigned char depth;
@ -79,17 +77,15 @@ struct DivSample {
short* data16; // 16
unsigned char* data1; // 0
unsigned char* dataDPCM; // 1
unsigned char* dataAICA; // 2
unsigned char* dataZ; // 3
unsigned char* dataQSoundA; // 4
unsigned char* dataA; // 5
unsigned char* dataB; // 6
unsigned char* dataX68; // 7
unsigned char* dataBRR; // 9
unsigned char* dataVOX; // 10
unsigned int length8, length16, length1, lengthDPCM, lengthAICA, lengthZ, lengthQSoundA, lengthA, lengthB, lengthX68, lengthBRR, lengthVOX;
unsigned int off8, off16, off1, offDPCM, offAICA, offZ, offQSoundA, offA, offB, offX68, offBRR, offVOX;
unsigned int length8, length16, length1, lengthDPCM, lengthZ, lengthQSoundA, lengthA, lengthB, lengthBRR, lengthVOX;
unsigned int off8, off16, off1, offDPCM, offZ, offQSoundA, offA, offB, offBRR, offVOX;
unsigned int offSegaPCM, offQSound, offX1_010, offSU;
unsigned int samples;
@ -222,36 +218,30 @@ struct DivSample {
data16(NULL),
data1(NULL),
dataDPCM(NULL),
dataAICA(NULL),
dataZ(NULL),
dataQSoundA(NULL),
dataA(NULL),
dataB(NULL),
dataX68(NULL),
dataBRR(NULL),
dataVOX(NULL),
length8(0),
length16(0),
length1(0),
lengthDPCM(0),
lengthAICA(0),
lengthZ(0),
lengthQSoundA(0),
lengthA(0),
lengthB(0),
lengthX68(0),
lengthBRR(0),
lengthVOX(0),
off8(0),
off16(0),
off1(0),
offDPCM(0),
offAICA(0),
offZ(0),
offQSoundA(0),
offA(0),
offB(0),
offX68(0),
offBRR(0),
offVOX(0),
offSegaPCM(0),

View File

@ -162,7 +162,6 @@ void FurnaceGUI::drawDebug() {
ImGui::Text("lengthQSoundA: %d",sample->lengthQSoundA);
ImGui::Text("lengthA: %d",sample->lengthA);
ImGui::Text("lengthB: %d",sample->lengthB);
ImGui::Text("lengthX68: %d",sample->lengthX68);
ImGui::Text("lengthBRR: %d",sample->lengthBRR);
ImGui::Text("lengthVOX: %d",sample->lengthVOX);
@ -173,7 +172,6 @@ void FurnaceGUI::drawDebug() {
ImGui::Text("offQSoundA: %x",sample->offQSoundA);
ImGui::Text("offA: %x",sample->offA);
ImGui::Text("offB: %x",sample->offB);
ImGui::Text("offX68: %x",sample->offX68);
ImGui::Text("offBRR: %x",sample->offBRR);
ImGui::Text("offVOX: %x",sample->offVOX);
ImGui::Text("offSegaPCM: %x",sample->offSegaPCM);

View File

@ -116,12 +116,12 @@ const char* insTypes[DIV_INS_MAX]={
const char* sampleDepths[17]={
"1-bit PCM",
"1-bit DPCM",
"Yamaha AICA",
NULL,
"YMZ/YMU ADPCM",
"QSound ADPCM",
"ADPCM-A",
"ADPCM-B",
"X68000 ADPCM",
NULL,
"8-bit PCM",
NULL, // "BRR",
"VOX",