Computer Science Canada
Music.PlayFile - maximum cd tracks?
|Author:||JayLo [ Wed Jun 04, 2003 4:04 pm ]|
|Post subject:||Music.PlayFile - maximum cd tracks?|
hey all. would you happen to know if turing can detect the maximum cd tracks on a cd inserted into the cd drive?
|Author:||Tony [ Wed Jun 04, 2003 4:29 pm ]|
I'm not sure... the way to do it, would be to get a list of files in the folder (CD)... I can do that in VB, dont know if turing lets you though... I would assume it has something to do with Sys.whatever
|Author:||Dan [ Wed Jun 04, 2003 4:49 pm ]|
this will help (from the turing help thing):
Dir.Get Part of Dir module
Syntax Dir.Get (streamNumber : int) : string
Description Dir.Get is part of a series of four subprograms that help users get directory listings. Dir.Get is used to get the file names in the directory. Each time the function is called, it returns the next file name in the directory. The names are not sorted. When there are no more file names in the directory, Dir.Get returns the empty string.
Details If the Dir.Get call fails, then Error.Last will return a non-zero value indicating the reason for the failure. Error.LastMsg will return a string which contains the textual version of the error.
Example This program prints a listing of all the files in the directory datafiles.
var streamNumber : int
var fileName : string
streamNumber := Dir.Open ("datafiles")
assert streamNumber > 0
fileName := Dir.Get (streamNumber)
exit when fileName = ""
|Author:||PaddyLong [ Wed Jun 04, 2003 5:21 pm ]|
I am not sure that this will help because Turing can't play .CDA files can it?
you would have to rip them to wav or mp3 ... but if you're going to be reading them as wav or mp3's you might as well just use basic m3u playlists and get each line and play that file...
not unless of course you have created a cda to wav or mp3 converter in Turing ...
|Author:||JayLo [ Wed Jun 04, 2003 5:31 pm ]|
no. what i'm doing is using the Music.PlayFile ("cd:x") where x is the track number.