|
|
| version 1.1.1.1, 2003/10/16 17:58:13 | version 1.2, 2003/12/01 04:01:42 |
|---|---|
| Line 462 static void tremolo_update(VOICE v) { | Line 462 static void tremolo_update(VOICE v) { |
| int depth; | int depth; |
| int cnt; | int cnt; |
| int vol; | int vol; |
| int pos; | |
| depth = v->sample->tremolo_depth << 8; | depth = v->sample->tremolo_depth << 8; |
| if (v->tremolo.sweepstep) { | if (v->tremolo.sweepstep) { |
| Line 476 static void tremolo_update(VOICE v) { | Line 477 static void tremolo_update(VOICE v) { |
| } | } |
| v->tremolo.count += v->tremolo.step; | v->tremolo.count += v->tremolo.step; |
| cnt = v->tremolo.count >> TRERATE_SHIFT; | cnt = v->tremolo.count >> TRERATE_SHIFT; |
| vol = envsin12q[cnt & ((1 << (SINENT_BIT - 2)) - 1)]; | pos = cnt & ((1 << (SINENT_BIT - 2)) - 1); |
| if (cnt & (1 << (SINENT_BIT - 2))) { | if (cnt & (1 << (SINENT_BIT - 2))) { |
| vol = (1 << 12) - vol; | pos ^= ((1 << (SINENT_BIT - 2)) - 1); |
| } | } |
| vol = envsin12q[pos]; | |
| if (cnt & (1 << (SINENT_BIT - 1))) { | if (cnt & (1 << (SINENT_BIT - 1))) { |
| vol = 0 - vol; | vol = 0 - vol; |
| } | } |