View Full Version : "srate" IPC_GET_EXTENDED_FILE_INFO still broken in 5.54
n2jtx
9th July 2008, 20:51
I ran a quick test and I see that Sample Rate tag "srate" is still not being returned via IPC_GET_EXTENDED_FILE_INFO. I am not exactly sure when it broke but it was working with earlier 5.5x versions before 5.531. Previously one would typically get back 44100 assuming a standard MP3 was playing.
I know it is possible to get a sample rate value via the statement:
SendMessage(plugin.hwndParent, WM_WA_IPC, 0, IPC_GETINFO) * 1000
But that will return 44000 not 44100 which the "srate" tag would return.
"srate" isn't a valid metadata tag in the source for any of the input plugins from what i can see. i think it might have been changed to "bitrate" but not 100% certain - someone else from the dev team will have to clarify that.
-daz
n2jtx
10th July 2008, 13:45
I noticed in a string dump of the latest in_mp3.dll that srate is no longer there. I thought was working fine up until around 5.53. Frankly I did not notice it missing until I saw the blank sample rate field in a log file generated by my plug-in. I thought I had a bad MP3 but then more testing showed no data coming back.
As I was writing this, I was able to find an older installation of 5.35 and it has the srate tag in in_mp3.dll. This is a string dump of the relevant section from in_mp3.dll dated 05/17/2007 (srate is in there between stereo and bitrate):
disc
length
track
genre
gain
stereo
srate
bitrate
composer
year
comment
albumartist
album
Apparently it disappeared sometime after 5.35 and I do not have the intermediate releases to check. If someone has the older source lying around from that release they will probably see it in there. The latest 5.54 in_mp3.dll has the strings all rearranged.
n2jtx
10th July 2008, 20:55
More information: I was able to track down a 5.5 installation and I see that "srate" is missing in that release. So it would appear that it disappeared from in_mp3.dll between 5.35 and 5.5.
I recall now that the system I was running had 5.35 on it until I upgraded straight to 5.53, skipping over 5.5 to 5.52. It was a useful tag, to me anyhow, and it would be nice to have it back.
n2jtx
12th July 2008, 16:59
I did some more research and downloaded the 5.34 SDK. Low and behold, I found the following line in the new wa_ipc.h for IPC_GETINFO:
** Mode Meaning
** ------------------
** 5 (5.25+) Samplerate, in hertz (i.e. 44100)
It looks like the new mode 5 request replaces the "srate" request. At this point, a simple Winamp version check added to my code and I can retrieve the sample rate using this method instead of IPC_GET_EXTENDED_FILE_INFO.
was probably a change done for the modern skin engine and was made more generic rather than being limited to only a few input plugins as the metadata query hack provided. just got to love having to version check things all the time *shrugs*
-daz
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.