- Fixed: Timidity::Renderer::reset_voices() must completely zero the

voices. Because this wasn't done, note_on() could try to access
  the sample for a voice that had never been played yet and access
  random memory. There may be other places where it's a problem, but
  this is where I noticed it, by chance.


SVN r1182 (trunk)
This commit is contained in:
Randy Heit 2008-08-23 02:38:00 +00:00
commit 0e5587812e
3 changed files with 10 additions and 6 deletions

View file

@ -36,10 +36,7 @@ namespace Timidity
void Renderer::reset_voices()
{
for (int i = 0; i < voices; i++)
{
voice[i].status = 0;
}
memset(voice, 0, sizeof(voice[0]) * voices);
}
/* Process the Reset All Controllers event */