# HG changeset patch # User Matti Hamalainen # Date 1349543420 -10800 # Node ID c0aaf31061486f6222756b15a9ac38bd7b7eee75 # Parent b778cc2fe7c852dc78d348f27c409e7af6696f8e Set new instrument flag only if the instrument differs from previously set one. diff -r b778cc2fe7c8 -r c0aaf3106148 jssplr.c --- a/jssplr.c Sat Oct 06 19:13:20 2012 +0300 +++ b/jssplr.c Sat Oct 06 20:10:20 2012 +0300 @@ -1130,12 +1130,13 @@ if (tmp >= 0 && tmp < mp->module->ninstruments) { JSSInstrument *inst = mp->module->instruments[tmp]; + JMPSETNDFLAGS((tmp != chn->ninstrument ? cdfNewInstr : 0)); chn->ninstrument = tmp; chn->instrument = inst; chn->volume = inst->volume; chn->panning = inst->EPanning; chn->position = 0; - JMPSETNDFLAGS(cdfPlay | cdfNewPos | cdfNewInstr | cdfNewPanPos); + JMPSETNDFLAGS(cdfPlay | cdfNewPos | cdfNewPanPos); } }