|
|
#1 |
|
Junior Member
|
How to detect playing file versus stream?
I have been searching for a way to determine whether or not Winamp is playing a file or a stream from a plugin. One way that had some success was checking for a track length of -1 via IPC_GETOUTPUTTIME. However, this has an occasional glitch in that -1 is returned if the IPC is called shortly after a file starts playing. Apparently Winamp takes a brief moment to determine the length of a file and will return -1 until it calculates the information.
|
|
|
|
|
|
#2 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,278
|
try IPC_PE_GETINDEXTITLE from ipc_pe.h and make sure you have zeroed the fileinfo2 structure before calling that message and then check the length of the filelength member. if it's zero length then it's a stream (that's what i've found from making my tooltip override plugin)
-daz |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
|
A length of zero can also mean the playlist hasnt yet loaded the meta data for that file. Of course, if the file is playing this is unlikely. Im pretty sure winamp itself just checks for "http:", but obviously there are other stream types.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|