aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth
diff options
context:
space:
mode:
authorathrxx2018-12-06 19:36:44 +0100
committerathrxx2019-03-07 21:28:35 +0100
commitb789d50a55cc22e481d286a1038d3ec4092b23ec (patch)
treeeea3ff8e9129dd1a929d6d373d2015b84ccb6780 /audio/softsynth
parent4a226aa8358108b1a7b861bb0578ba7be84b44b1 (diff)
downloadscummvm-rg350-b789d50a55cc22e481d286a1038d3ec4092b23ec.tar.gz
scummvm-rg350-b789d50a55cc22e481d286a1038d3ec4092b23ec.tar.bz2
scummvm-rg350-b789d50a55cc22e481d286a1038d3ec4092b23ec.zip
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)
Diffstat (limited to 'audio/softsynth')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp10
1 files changed, 4 insertions, 6 deletions
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);