fixing jar so it compiles on vs2010

This commit is contained in:
NishiOwO 2025-04-20 15:47:46 +09:00
parent a3fa1cf04c
commit 67d0de7d28
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343

View File

@ -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);
}