Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Music.PlayFile - maximum cd tracks?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
JayLo




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jun 04, 2003 4:29 pm   Post subject: (No subject)

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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Wed Jun 04, 2003 4:49 pm   Post subject: (No subject)

this will help (from the turing help thing):

Quote:
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
loop
fileName := Dir.Get (streamNumber)
exit when fileName = ""
put fileName
end loop
Dir.Close (streamNumber)
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PaddyLong




PostPosted: Wed Jun 04, 2003 5:21 pm   Post subject: (No subject)

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 ... Confused
JayLo




PostPosted: Wed Jun 04, 2003 5:31 pm   Post subject: (No subject)

no. what i'm doing is using the Music.PlayFile ("cd:x") where x is the track number.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: