mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 12:14:39 +00:00
fixing jar so it compiles on vs2010
This commit is contained in:
parent
a3fa1cf04c
commit
67d0de7d28
9
engine/external/jar/jar_xm.h
vendored
9
engine/external/jar/jar_xm.h
vendored
@ -1263,16 +1263,19 @@ static float jar_xm_waveform(jar_xm_waveform_type_t waveform, gf_uint8_t step) {
|
||||
}
|
||||
|
||||
static void jar_xm_autovibrato(jar_xm_context_t* ctx, jar_xm_channel_context_t* ch) {
|
||||
jar_xm_instrument_t* instr;
|
||||
float sweep;
|
||||
unsigned int step;
|
||||
if(ch->instrument == NULL || ch->instrument->vibrato_depth == 0) return;
|
||||
jar_xm_instrument_t* instr = ch->instrument;
|
||||
float sweep = 1.f;
|
||||
instr = ch->instrument;
|
||||
sweep = 1.f;
|
||||
|
||||
if(ch->autovibrato_ticks < instr->vibrato_sweep) {
|
||||
/* No idea if this is correct, but it sounds close enough… */
|
||||
sweep = jar_xm_LERP(0.f, 1.f, (float)ch->autovibrato_ticks / (float)instr->vibrato_sweep);
|
||||
}
|
||||
|
||||
unsigned int step = ((ch->autovibrato_ticks++) * instr->vibrato_rate) >> 2;
|
||||
step = ((ch->autovibrato_ticks++) * instr->vibrato_rate) >> 2;
|
||||
ch->autovibrato_note_offset = .25f * jar_xm_waveform(instr->vibrato_type, step) * (float)instr->vibrato_depth / (float)0xF * sweep;
|
||||
jar_xm_update_frequency(ctx, ch);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user