ph_winampinfo PowerHome formula function
Description
Retrieves information from a Winamp instance running on the PowerHome machine.
Syntax
ph_winampinfo ( command, data, local )
Argument Description
command String. A string representation of the info command.
data Long. Data to passed for certain commands. Use 0 for commands that do not require data.
local Integer. The index of a local variable in which to return error information. Use 0 to not return error information.
Return value
String. Returns data for the requested command. If the command is successful, then the local variable will contain "0". If an error occurs, then the local variable will contain "1". If Winamp is not running, then the local variable will contain "2". If the command is not recognized, then the local variable will contain "3".
Usage
Use this function to retrieve information from an instance of Winamp running on the PowerHome computer. This function relies upon the data in the [Winamp] section of the pwrhome.ini file.

Command Description
status Returns the current status of Winamp. Possible return values are "playing", "paused", "stopped", and "not running".
title Returns the title of the current song.
titlenum Returns the number of the current title within the current playlist.
version Returns the version of Winamp that is running.
trackpos Returns the current position in milliseconds of the current song.
tracklen Returns the length of the current song in seconds.
listlen Returns the length of the current playlist in tracks.
listpos Returns the current position within the playlist.
tracksamplerate Returns the sample rate of the current playing song.
trackbitrate Returns the bitrate of the current playing song.
tracknumchannels Returns the number of channels of the current playing song.
trackpercent Returns the percent complete of the current playing song.
shuffle Returns the status of the shuffle.
repeat Returns the status of the repeat.
listfilename Returns the filename of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listtitlename Returns the title name of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listpath Returns the path of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listartist Returns the artist of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listtitle Returns the title of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listalbum Returns the album of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listyear Returns the year of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listbitrate Returns the bitrate of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.
listlength Returns the length of a song within the playlist. The data parameter is the number of the song whose data you wish returned. Use - 1 for the current playing song.