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

Username:   Password: 
 RegisterRegister   
 Music - HELP (adding music to program)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bigbut600




PostPosted: Wed Nov 26, 2008 8:34 pm   Post subject: Music - HELP (adding music to program)

My 2nd question so far...

The title says it all. I just want to add music to my program as long as it's running in the execution window. I'd also like for it to repeat when the music is over. I'm pretty sure this is possible.

If anyone can, please explain in detail and examples?


Thanks again,

bigbut600
Sponsor
Sponsor
Sponsor
sponsor
Jurica




PostPosted: Wed Nov 26, 2008 9:38 pm   Post subject: RE:Music - HELP (adding music to program)

Lol, I just finished a project with music and asked for help yesterday. Finished it so I'll help you with it. Here is the code (don't add the [ ]'s in it):

Turing:

% Process to continuously play background music
process PlayBackgroundMusic (filename : string)
    loop
        exit when finished
        Music.PlayFile (filename)
    end loop
end PlayBackgroundMusic

% Music
Music.PlayFileLoop ("[NameOfFile].[TypeOfFile]")
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  [ 2 Posts ]
Jump to:   


Style:  
Search: