mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
Display some info in XMPlay window
This commit is contained in:
parent
35cd14fa04
commit
044b479fc8
@ -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) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user