mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
Fix XMPlay compiler warning
This commit is contained in:
parent
f59faa0c07
commit
c82058f112
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user