Mercurial > hg > dmlib
changeset 194:c0aaf3106148
Set new instrument flag only if the instrument differs from previously set one.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 06 Oct 2012 20:10:20 +0300 |
parents | b778cc2fe7c8 |
children | 24e1f1990a85 |
files | jssplr.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }