Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 6173 → Rev 6174

/source/libxmp-lite/src/mix_all.c
149,8 → 149,8
#define VAR_NORM(x) \
register int smp_in; \
x *sptr = (x *)vi->sptr; \
unsigned int pos = vi->pos; \
int frac = (1 << SMIX_SHIFT) * (vi->pos - (int)vi->pos)
unsigned int pos = (unsigned int)vi->pos; \
int frac = (int)((1 << SMIX_SHIFT) * (vi->pos - (int)vi->pos))
 
#define VAR_LINEAR_MONO(x) \
VAR_NORM(x); \
/source/libxmp-lite/src/mixer.c
316,7 → 316,7
struct mixer_data *s = &ctx->s;
int bytelen;
 
s->ticksize = s->freq * m->time_factor * m->rrate / p->bpm / 1000;
s->ticksize = (int)(s->freq * m->time_factor * m->rrate / p->bpm / 1000);
 
bytelen = s->ticksize * sizeof(int);
if (~s->format & XMP_FORMAT_MONO) {
393,7 → 393,7
continue;
}
 
vi->pos0 = vi->pos;
vi->pos0 = (int)vi->pos;
 
buf_pos = s->buf32;
if (vi->pan == PAN_SURROUND) {
406,7 → 406,7
 
if (vi->smp < mod->smp) {
xxs = &mod->xxs[vi->smp];
c5spd = m->xtra[vi->smp].c5spd;
c5spd = (int) m->xtra[vi->smp].c5spd;
} else {
xxs = &ctx->smix.xxs[vi->smp - mod->smp];
c5spd = m->c4rate;
465,7 → 465,7
samples = 0;
usmp = 1;
} else {
int s = ceil(((double)vi->end - vi->pos) / step);
int s = (int) ceil(((double)vi->end - vi->pos) / step);
/* ...inside the tick boundaries */
if (s > size) {
s = size;
523,7 → 523,7
 
if (mix_fn != NULL) {
mix_fn(vi, buf_pos, samples,
vol_l >> 8, vol_r >> 8, step * (1 << SMIX_SHIFT), rsize, delta_l, delta_r);
vol_l >> 8, vol_r >> 8, (int) step * (1 << SMIX_SHIFT), rsize, delta_l, delta_r);
}
 
buf_pos += mix_size;
/source/libxmp-lite/src/period.c
219,7 → 219,7
return 0;
}
 
return round(12.0 * log(PERIOD_BASE / p) / M_LN2) + 1;
return (int)round(12.0 * log(PERIOD_BASE / p) / M_LN2) + 1;
}
 
/* Get pitchbend from base note and amiga period */
234,14 → 234,14
 
switch (m->period_type) {
case PERIOD_LINEAR:
return 100 * (8 * (((240 - n) << 4) - p));
return (int) (100 * (8 * (((240 - n) << 4) - p)));
case PERIOD_CSPD:
d = libxmp_note_to_period(ctx, n, 0, adj);
return round(100.0 * (1536.0 / M_LN2) * log(p / d));
return (int) round(100.0 * (1536.0 / M_LN2) * log(p / d));
default:
/* Amiga */
d = libxmp_note_to_period(ctx, n, 0, adj);
return round(100.0 * (1536.0 / M_LN2) * log(d / p));
return (int) round(100.0 * (1536.0 / M_LN2) * log(d / p));
}
}
 
/source/libxmp-lite/src/player.c
925,12 → 925,12
 
/* For xmp_get_frame_info() */
xc->info_pitchbend = linear_bend >> 7;
xc->info_period = period * 4096;
xc->info_period = (int) period * 4096;
 
if (IS_PERIOD_MODRNG()) {
CLAMP(xc->info_period,
libxmp_note_to_period(ctx, MAX_NOTE_MOD, xc->finetune, 0) * 4096,
libxmp_note_to_period(ctx, MIN_NOTE_MOD, xc->finetune, 0) * 4096);
(int) libxmp_note_to_period(ctx, MAX_NOTE_MOD, xc->finetune, 0) * 4096,
(int) libxmp_note_to_period(ctx, MIN_NOTE_MOD, xc->finetune, 0) * 4096);
} else if (xc->info_period < (1 << 12)) {
xc->info_period = (1 << 12);
}
1311,7 → 1311,7
SET_NOTE(NOTE_RELEASE);
}
 
xc->info_position = libxmp_virt_getvoicepos(ctx, chn);
xc->info_position = (int) libxmp_virt_getvoicepos(ctx, chn);
}
 
/*
1847,8 → 1847,8
info->speed = p->speed;
info->bpm = p->bpm;
info->total_time = p->scan[p->sequence].time;
info->frame_time = p->frame_time * 1000;
info->time = p->current_time;
info->frame_time = (int) p->frame_time * 1000;
info->time = (int) p->current_time;
info->buffer = s->buffer;
 
info->total_size = XMP_MAX_FRAMESIZE;
/source/libxmp-lite/src/scan.c
90,7 → 90,7
bpm = mod->bpm;
 
speed = mod->spd;
base_time = m->rrate;
base_time = (int) m->rrate;
#ifndef LIBXMP_CORE_PLAYER
st26_speed = 0;
#endif
173,7 → 173,7
info->gvl = gvl;
info->bpm = bpm;
info->speed = speed;
info->time = time + m->time_factor * frame_count * base_time / bpm;
info->time = (int) (time + m->time_factor * frame_count * base_time / bpm);
#ifndef LIBXMP_CORE_PLAYER
info->st26_speed = st26_speed;
#endif
485,7 → 485,7
time -= start_time;
frame_count += row_count * speed;
 
return (time + m->time_factor * frame_count * base_time / bpm);
return (int) (time + m->time_factor * frame_count * base_time / bpm);
}
 
int libxmp_get_sequence(struct context_data *ctx, int ord)