Fix valgrind warning.
svn-id: r44084
This commit is contained in:
parent
8ac3db0801
commit
5ed03fcd3a
1 changed files with 8 additions and 1 deletions
|
@ -557,7 +557,14 @@ void MusicPlayerXMI::setTimbreAD(byte channel, const Timbre &timbre) {
|
|||
}
|
||||
|
||||
// Prepare the AdLib Instrument array from the GTL entry
|
||||
byte data[13];
|
||||
//
|
||||
// struct AdlibInstrument used by our AdLib MIDI synth is 30 bytes,
|
||||
// since we pass data + 2 for non precussion instruments we need to
|
||||
// have a buffer of size 32, so there are no invalid memory reads,
|
||||
// when setting up an AdLib instrument.
|
||||
byte data[32];
|
||||
memset(data, 0, sizeof(data));
|
||||
|
||||
data[2] = timbre.data[1]; // mod_characteristic
|
||||
data[3] = timbre.data[2] ^ 0x3F; // mod_scalingOutputLevel
|
||||
data[4] = ~timbre.data[3]; // mod_attackDecay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue