Difference between revisions of "MJCurPlaylistAutomation"
Skeeterfood (talk | contribs) m (→Functions) |
Skeeterfood (talk | contribs) (→Functions) |
||
Line 8: | Line 8: | ||
'''Description:''' gets the [[MJFileAutomation]] interface for the given file index<br> | '''Description:''' gets the [[MJFileAutomation]] interface for the given file index<br> | ||
'''Parameters:''' | '''Parameters:''' | ||
+ | * '''nFile''': the index of the file to retrieve (0 to GetNumberFiles() - 1) | ||
'''Return Value:''' [[MJFileAutomation]] interface | '''Return Value:''' [[MJFileAutomation]] interface | ||
Line 23: | Line 24: | ||
'''Parameters:''' | '''Parameters:''' | ||
* '''strFilename''': the filename of the file to add | * '''strFilename''': the filename of the file to add | ||
− | * '''nPosition''': the position | + | * '''nPosition''': the position to add the file inside "Playing Now" |
'''Return Value:''' 0 on failure, non-zero on success | '''Return Value:''' 0 on failure, non-zero on success | ||
Line 30: | Line 31: | ||
'''Parameters:''' | '''Parameters:''' | ||
* '''nKey''': the key of the file to add | * '''nKey''': the key of the file to add | ||
− | * '''nPosition''': the position | + | * '''nPosition''': the position to add the file inside "Playing Now" |
'''Return value:''' 0 for failure, non-zero for success | '''Return value:''' 0 for failure, non-zero for success | ||
Line 45: | Line 46: | ||
===number GetNextFile()=== | ===number GetNextFile()=== | ||
− | '''Description:''' gets the index of the file to play | + | '''Description:''' gets the index of the "Next" file to play<br> |
− | '''Return Value:''' index of file | + | '''Return Value:''' index of file (0 to GetNumberFiles() - 1) |
===boolean GetPreviousFile()=== | ===boolean GetPreviousFile()=== | ||
− | '''Description:''' gets the index of the | + | '''Description:''' gets the index of the "Previous" file played<br> |
− | '''Return Value:''' index of file | + | '''Return Value:''' index of file (0 to GetNumberFiles() - 1) |
===boolean GetCanPlayNext()=== | ===boolean GetCanPlayNext()=== |
Revision as of 21:02, 7 October 2009
interface for working with "Playing Now" (the current playlist)
Contents
- 1 Functions
- 1.1 number GetNumberFiles()
- 1.2 MJFileAutomation * GetFile(number nFile)
- 1.3 void RemoveAllFiles()
- 1.4 boolean RemoveFile(number nFile)
- 1.5 boolean AddFile(string strFilename, number nPosition)
- 1.6 boolean AddFileByKey(number nKey, number nPosition)
- 1.7 boolean MoveFile(number nFileOld, number nFileNew)
- 1.8 boolean ReShuffleFiles()
- 1.9 number GetNextFile()
- 1.10 boolean GetPreviousFile()
- 1.11 boolean GetCanPlayNext()
- 2 Properties
Functions
number GetNumberFiles()
Description: returns the number of files in "Playing Now"
Return Value: number of files
MJFileAutomation * GetFile(number nFile)
Description: gets the MJFileAutomation interface for the given file index
Parameters:
- nFile: the index of the file to retrieve (0 to GetNumberFiles() - 1)
Return Value: MJFileAutomation interface
void RemoveAllFiles()
Description: removes all of the files from "Playing Now" (stops playback)
boolean RemoveFile(number nFile)
Description: removes a specific file from "Playing Now"
Parameters:
- nFile: the index of the file to retrieve (0 to GetNumberFiles() - 1)
Return Value: 0 on failure, non-zero on success
boolean AddFile(string strFilename, number nPosition)
Description: adds a file to "Playing Now"
Parameters:
- strFilename: the filename of the file to add
- nPosition: the position to add the file inside "Playing Now"
Return Value: 0 on failure, non-zero on success
boolean AddFileByKey(number nKey, number nPosition)
Description: Add the file to "Playing Now"
Parameters:
- nKey: the key of the file to add
- nPosition: the position to add the file inside "Playing Now"
Return value: 0 for failure, non-zero for success
boolean MoveFile(number nFileOld, number nFileNew)
Description: moves a file to a new location in "Playing Now"
Parameters:
- nFileOld: the index of the file to move
- nFileNew: the index to move the file to
Return Value: 0 on failure, non-zero on success
boolean ReShuffleFiles()
Description: shuffles "Playing Now" so it's in a random order
Return Value: 0 on failure, non-zero on success
number GetNextFile()
Description: gets the index of the "Next" file to play
Return Value: index of file (0 to GetNumberFiles() - 1)
boolean GetPreviousFile()
Description: gets the index of the "Previous" file played
Return Value: index of file (0 to GetNumberFiles() - 1)
boolean GetCanPlayNext()
Description: Determine if there is another file to play after the currently playing file
Return Value: true only if there is one
Properties
number Position() (read / write)
Description: the index of the current track
number Shuffle() (read / write)
Description: the shuffle state (0 = off, 1 = on)
number Continuous() (read / write)
Description: the continuous state (0 = off, 1 = on)