From 40fbde0eba49d38b697fda84fb2c527f42b887fb Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Sun, 10 Mar 2013 22:02:13 -0700 Subject: [PATCH] Initialize ActiveNote structure The initial state of ActiveNote was undefined, leading to problems on Android. --- cpp/src/synth_unit.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/synth_unit.cc b/cpp/src/synth_unit.cc index a20f695..81bfb35 100644 --- a/cpp/src/synth_unit.cc +++ b/cpp/src/synth_unit.cc @@ -39,6 +39,8 @@ SynthUnit::SynthUnit(RingBuffer *ring_buffer) { ring_buffer_ = ring_buffer; for (int note = 0; note < max_active_notes; ++note) { active_note_[note].dx7_note = NULL; + active_note_[note].keydown = false; + active_note_[note].sustained = false; } input_buffer_index_ = 0; memcpy(patch_data_, epiano, sizeof(epiano));