shithub: choc

Download patch

ref: fe96ae292d2b0e67020d77493ae366360cd93ec8
parent: a26925cf8f27eb38b3266629a3bc259f098b1e19
author: Simon Howard <fraggle@gmail.com>
date: Mon Aug 31 14:33:36 EDT 2009

Dont program an instrument if it is already set.

Subversion-branch: /branches/opl-branch
Subversion-revision: 1652

--- a/src/i_oplmusic.c
+++ b/src/i_oplmusic.c
@@ -445,6 +445,13 @@
     genmidi_voice_t *data;
     unsigned int modulating;
 
+    // Instrument already set for this channel?
+
+    if (voice->current_instr == instr)
+    {
+        return;
+    }
+
     voice->current_instr = instr;
     data = &instr->opl2_voice;