Old 9th July 2008, 21:51   #1
n2jtx
Junior Member
 
Join Date: Feb 2004
Posts: 35
Send a message via AIM to n2jtx
"srate" IPC_GET_EXTENDED_FILE_INFO still broken in 5.54

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.

Author of the "Auto Close" and "What's Playing v2" plugins.

I support the Right to Keep and Arm Bears.
n2jtx is offline   Reply With Quote
Old 9th July 2008, 22:25   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
"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
DrO is offline   Reply With Quote
Old 10th July 2008, 14:45   #3
n2jtx
Junior Member
 
Join Date: Feb 2004
Posts: 35
Send a message via AIM to n2jtx
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.

Author of the "Auto Close" and "What's Playing v2" plugins.

I support the Right to Keep and Arm Bears.
n2jtx is offline   Reply With Quote
Old 10th July 2008, 21:55   #4
n2jtx
Junior Member
 
Join Date: Feb 2004
Posts: 35
Send a message via AIM to n2jtx
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.

Author of the "Auto Close" and "What's Playing v2" plugins.

I support the Right to Keep and Arm Bears.
n2jtx is offline   Reply With Quote
Old 12th July 2008, 17:59   #5
n2jtx
Junior Member
 
Join Date: Feb 2004
Posts: 35
Send a message via AIM to n2jtx
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.

Author of the "Auto Close" and "What's Playing v2" plugins.

I support the Right to Keep and Arm Bears.
n2jtx is offline   Reply With Quote
Old 13th July 2008, 11:48   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
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
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump