Display some info in XMPlay window

This commit is contained in:
Pavel Chuzov 2018-05-05 04:37:24 +07:00
parent 35cd14fa04
commit 044b479fc8

View File

@ -331,9 +331,20 @@ char * WINAPI xmplay_GetTags() {
void WINAPI xmplay_GetInfoText(char* format, char* length) {
if (!format)
return;
if (!vgmstream)
return;
sprintf(format,"vgmstream");
/* length is the file time */
int rate = vgmstream->sample_rate;
int samples = vgmstream->num_samples;
int bps = get_vgmstream_average_bitrate(vgmstream) / 1000;
char* fmt = get_vgmstream_coding_description(vgmstream->coding_type);
int t = samples / rate;
int tmin = t / 60;
int tsec = t % 60;
sprintf(format, "%s", fmt);
sprintf(length, "%d:%02d - %dKb/s - %dHz", tmin, tsec, bps, rate);
}
/* info for the "General" window/tab (buf is ~40K) */