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

Username:   Password: 
 RegisterRegister   
 Help with music file
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bahamut




PostPosted: Mon Jan 10, 2005 10:41 pm   Post subject: Help with music file

Im new to this so... yeah ok. When i make turing play a music file it goes throught the whole file and then does other tasks. Is there a way to make it run in the background? While other tasks are bieng preformed? Confused
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon Jan 10, 2005 11:10 pm   Post subject: (No subject)

Hello.

2 options.

First off, there's the good ol' process approach that we all find utterly irritating except in very particular situations.

Turing:

var musicFileName : string := "mymusic.wav"

process playMe
    Music.PlayFile (musicFileName)
end playMe

fork playMe

for i : 1..100
    put "The music is now playing.  Look sharp!"
    delay (10)
end for


Then, there's the nicer version, that is only available in OOT 4.0.5 (AFAIK), and goes something like this.

Turing:

var musicFileName : string := "mymusic.wav"

Music.PlayFileReturn (musicFileName)

for i : 1..100
    put "Play on...flatten us with your volume!"
    delay (10)
end for


Yes, I know the [syntax] tags aren't working yet for OOT, just getting into the habit...

Edit:
BTW, bahamut...resize your avtar or face the wrath of the many mods that shall be lurking quite soon...just a friendly warning...Razz
bahamut




PostPosted: Tue Jan 11, 2005 6:42 pm   Post subject: thanks

Thanks for the help i got it to work.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: