Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Source/Core/Core/DSP/DSPAccelerator.cpp b/Source/Core/Core/DSP/DSPAccelerator.cpp
- index afa2bbcba4..efb2c47a69 100644
- --- a/Source/Core/Core/DSP/DSPAccelerator.cpp
- +++ b/Source/Core/Core/DSP/DSPAccelerator.cpp
- @@ -76,6 +76,35 @@ u16 Accelerator::Read(const s16* coefs)
- {
- case 0x00: // ADPCM audio
- {
- + static std::vector<s16*> coefs_hist;
- + bool found = false;
- +
- + for (s16* prev : coefs_hist)
- + {
- + if (memcmp(prev, coefs, 16 * sizeof(s16)) == 0)
- + {
- + found = true;
- + break;
- + }
- + }
- +
- + if (!found) {
- + s16 *buf = new s16[16];
- + memcpy(buf, coefs, 16 * sizeof(s16));
- + coefs_hist.push_back(buf);
- +
- + char hexBuf[256] = {0};
- +
- + for (int i = 0; i < 16; i++)
- + {
- + char hex[16];
- + sprintf(hex, "%04x", (uint16_t)coefs[i]);
- + strcat(hexBuf, hex);
- + }
- +
- + NOTICE_LOG_FMT(DSPINTERFACE, "DSP coef table: {}", hexBuf);
- + }
- +
- int scale = 1 << (m_pred_scale & 0xF);
- int coef_idx = (m_pred_scale >> 4) & 0x7;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement