From b789d50a55cc22e481d286a1038d3ec4092b23ec Mon Sep 17 00:00:00 2001 From: athrxx Date: Thu, 6 Dec 2018 19:36:44 +0100 Subject: AUDIO: (FM-TOWNS/PC-98) - fix valgrind warning (This didn't come up with the targets supported until now, but it does come up with SCI PC-98 music) --- audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'audio/softsynth/fmtowns_pc98') diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp index b73030e416..e3d86b3515 100644 --- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp @@ -1317,17 +1317,15 @@ void TownsPC98_FmSynth::setLevelSSG(int vol) { void TownsPC98_FmSynth::generateTables() { delete[] _oprRates; - _oprRates = new uint8[128]; + _oprRates = new uint8[130]; WRITE_BE_UINT32(_oprRates + 32, _numChan == 6 ? 0x90900000 : 0x00081018); WRITE_BE_UINT32(_oprRates + 36, _numChan == 6 ? 0x00001010 : 0x00081018); memset(_oprRates, 0x90, 32); - memset(&_oprRates[96], 0x80, 32); + memset(&_oprRates[96], 0x80, 34); uint8 *dst = (uint8 *)_oprRates + 40; for (int i = 0; i < 40; i += 4) WRITE_BE_UINT32(dst + i, 0x00081018); - for (int i = 0; i < 48; i += 4) - WRITE_BE_UINT32(dst + i, 0x00081018); dst += 40; for (uint8 i = 0; i < 16; i ++) { uint8 v = (i < 12) ? i : 12; @@ -1335,8 +1333,8 @@ void TownsPC98_FmSynth::generateTables() { } delete[] _oprRateshift; - _oprRateshift = new uint8[128]; - memset(_oprRateshift, 0, 128); + _oprRateshift = new uint8[130]; + memset(_oprRateshift, 0, 130); dst = (uint8 *)_oprRateshift + 32; for (int i = 11; i; i--) { memset(dst, i, 4); -- cgit v1.2.3