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

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




PostPosted: Wed Jan 25, 2006 2:58 pm   Post subject: Fork

I need to fork two mp3 files at the same time. One of the files is already playing (background music) and the other file needs to be played without restarting the background music...

Thanks for any help
Sponsor
Sponsor
Sponsor
sponsor
person




PostPosted: Wed Jan 25, 2006 3:04 pm   Post subject: (No subject)

its in F10
Clayton




PostPosted: Wed Jan 25, 2006 3:07 pm   Post subject: (No subject)

ok, first you need to have those music files playing in procs or functions, then whenever you want to play the other simply use the command fork with the second procs name after it to play both at the same time ex.
code:

proc backMusic
     Music.PlayFile(whateverItIs)
end backMusic
proc badMusic
     fork backMusic
     Music.PlayFile(frontMusic)
end badMusic

its just that simple, you may have to do this in a function, i cant quite remember but im sure you can fork procedures
person




PostPosted: Wed Jan 25, 2006 3:12 pm   Post subject: (No subject)

SuperFreak82 wrote:
im sure you can fork procedures


im pretty sure u can not fork procedures
however
im pretty sure u can fork processes
Chris




PostPosted: Wed Jan 25, 2006 3:13 pm   Post subject: (No subject)

SuperFreak82 wrote:
ok, first you need to have those music files playing in procs or functions, then whenever you want to play the other simply use the command fork with the second procs name after it to play both at the same time ex.
code:

proc backMusic
     Music.PlayFile(whateverItIs)
end backMusic
proc badMusic
     fork backMusic
     Music.PlayFile(frontMusic)
end badMusic

its just that simple, you may have to do this in a function, i cant quite remember but im sure you can fork procedures

First, you can't fork proceedures, and 2 it doesnt work with process', thanks anyways.
person




PostPosted: Wed Jan 25, 2006 3:15 pm   Post subject: (No subject)

can i c the code u used?
cuz it shuld work for processes[/quote]
Clayton




PostPosted: Wed Jan 25, 2006 3:15 pm   Post subject: (No subject)

try it with a function then b/c i know you can fork functions
person




PostPosted: Wed Jan 25, 2006 3:17 pm   Post subject: (No subject)

SuperFreak82 wrote:
try it with a function then b/c i know you can fork functions


don't try it with a function then b/c i know you cant fork functions
Sponsor
Sponsor
Sponsor
sponsor
codemage




PostPosted: Wed Jan 25, 2006 3:22 pm   Post subject: (No subject)

Wow. Welcome to the deparment of misinformation.

Procedures and functions can not be forked.

Only Processes can be forked.

Using process will screw you over.

Use Music.PlayFileReturn for your BGM. Then use it again for your sound effects. Turing can only handle one type of music file at a time, so use a different format for your effects than the one you used for BGM.

ex:
BGM = mp3
SFX = wav
Clayton




PostPosted: Wed Jan 25, 2006 3:23 pm   Post subject: (No subject)

person wrote:
SuperFreak82 wrote:
try it with a function then b/c i know you can fork functions


don't try it with a function then b/c i know you cant fork functions

actually yes you can, they are probably the best things to fork, they were the first thing i learned to fork, your probably thinking of procs
Clayton




PostPosted: Wed Jan 25, 2006 3:25 pm   Post subject: (No subject)

codemage wrote:
Wow. Welcome to the deparment of misinformation.

Only Processes can be forked.


then y was i able to fork my functions b4
?????????????????????
person




PostPosted: Wed Jan 25, 2006 3:26 pm   Post subject: (No subject)

wanna post the code u used to fork functions?[/quote]
Clayton




PostPosted: Wed Jan 25, 2006 3:27 pm   Post subject: (No subject)

person wrote:
wanna post the code u used to fork functions?
[/quote]
cant it was a "class lesson on forking functions" my school cleans out their system at the new semester which starts tomorrow
Clayton




PostPosted: Wed Jan 25, 2006 3:28 pm   Post subject: (No subject)

my bad it was processes that we did, forget i ever said nething
Andy




PostPosted: Wed Jan 25, 2006 5:10 pm   Post subject: (No subject)

rofl.. i should just delete this thread so when people search for forks, this wont show up.. please get ur facts right before helping people.. if you're ever unsure, press F9 and learn
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  [ 15 Posts ]
Jump to:   


Style:  
Search: