Hi luca, i'm afraid i can't help you much, as Xt7player itself uses mplayer get info about media files.
I Guess you've got to read the file header, which is different on different audio file types.
Also, different mp3 files can have different headers too (see xing header
for an example reference).
If you manage to write a library which doesn't uses mplayer i would be happy to take a look, mplayer sometimes fails in reporting currect values on mp3 files (mostly vbr ones).
Good gambas coding!