Fix XMPlay compiler warning

This commit is contained in:
bnnm 2018-10-06 22:33:10 +02:00
parent f59faa0c07
commit c82058f112

View File

@ -329,19 +329,23 @@ char * WINAPI xmplay_GetTags() {
/* main panel info text (short file info) */
void WINAPI xmplay_GetInfoText(char* format, char* length) {
int rate, samples, bps;
const char* fmt;
int t, tmin, tsec;
if (!format)
return;
if (!vgmstream)
return;
int rate = vgmstream->sample_rate;
int samples = vgmstream->num_samples;
int bps = get_vgmstream_average_bitrate(vgmstream) / 1000;
const char* fmt = get_vgmstream_coding_description(vgmstream->coding_type);
rate = vgmstream->sample_rate;
samples = vgmstream->num_samples;
bps = get_vgmstream_average_bitrate(vgmstream) / 1000;
fmt = get_vgmstream_coding_description(vgmstream->coding_type);
int t = samples / rate;
int tmin = t / 60;
int tsec = t % 60;
t = samples / rate;
tmin = t / 60;
tsec = t % 60;
sprintf(format, "%s", fmt);
sprintf(length, "%d:%02d - %dKb/s - %dHz", tmin, tsec, bps, rate);