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

Username:   Password: 
 RegisterRegister   
 Playing two sounds at once
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
VB_User




PostPosted: Mon Apr 14, 2003 8:21 pm   Post subject: Playing two sounds at once

Hey i am adding sound to my mortal kombat clone and i am having some trouble. I want it so that the background music is playing but there are also sound effects. I can only get on or the other to work. If anyone can tell me how to play two sounds at once that would be great.

Thanks alot
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: Mon Apr 14, 2003 8:49 pm   Post subject: (No subject)

with a process... have the sound playing in the background then you can play other sounds as well
code:
process bgmusic
loop
Music.PlayFile("themusic.mp3")
end loop
end bgmusic
fork bgmusic
jamez




PostPosted: Mon Apr 14, 2003 8:50 pm   Post subject: asdf

i just fooled around with music.playfile and i dont think its possilbe :/
jamez




PostPosted: Mon Apr 14, 2003 8:50 pm   Post subject: (No subject)

no blade, that doesnt work. when it goes to play the SFX it stops playing the BGM. test code before you post it Smile
Blade




PostPosted: Mon Apr 14, 2003 9:36 pm   Post subject: (No subject)

Quote:
Details The Turing 4.0.2 software can play files in the following audio formats: WAVE (.wav) files, MIDI files (.midi or .mid), and MP3 files (.mp3). In general, MIDI files are the most efficient and thus are the preferred form for longer music pieces like background music. WAVE files can record anything, not just music, so are often used for sound effects.

thats what it says in the help file... also, if you are running windows 98 you cant play more than one file at the same time... so try running a midi and an mp3 at the same time... dont accuse me for giving you false info, just because it isn't what you arent looking for.. jeez man
Asok




PostPosted: Mon Apr 14, 2003 9:39 pm   Post subject: (No subject)

let me just say I have had much better experiences with Turing when using mp3s as opposed to midis. MIDIs seem to cause a lot more lag.
Blade




PostPosted: Mon Apr 14, 2003 9:44 pm   Post subject: (No subject)

lol i dunno, i know with windows 98 you cant play more than 1 wav file at the same time... i think thats what his problem may be (i'm not sure about xp, some times it does, sometimes it doesnt)..
Asok




PostPosted: Mon Apr 14, 2003 9:46 pm   Post subject: (No subject)

I'm not totally sure, but it also might be a sound card issue
jamez




PostPosted: Mon Apr 14, 2003 9:48 pm   Post subject: (No subject)

shoudlnt be for me i can have kazaa playing music, winamp playing music, and DoD sfx playing all at once. i think its just turing doesnt output more than 1 sounds at once.
Blade




PostPosted: Mon Apr 14, 2003 9:49 pm   Post subject: (No subject)

i just did it with a midi!
Blade




PostPosted: Mon Apr 14, 2003 9:53 pm   Post subject: (No subject)

could i see the code you are using for it.. it may help
VB_User




PostPosted: Mon Apr 14, 2003 10:20 pm   Post subject: (No subject)

code:
process liu
loop
Music.PlayFile("C:/Sprite/mk2deadpool.mid")
end loop
end liu



process BG
loop
Music.PlayFile("C:/Sprites/liu.wav")
end loop
end BG




fork liu
fork BG



thast my code. It will only play the liu.wav file and not the midi
Blade




PostPosted: Mon Apr 14, 2003 10:22 pm   Post subject: (No subject)

i just tested that code with my midi, and wav, and it works fine...
Asok




PostPosted: Mon Apr 14, 2003 10:23 pm   Post subject: (No subject)

found your error

look at your file path

one is in "Sprite" directory the other is in "Sprites" there is a typo with one of them so double check Smile
VB_User




PostPosted: Tue Apr 15, 2003 4:12 pm   Post subject: (No subject)

Ok now i have another problem. I made it so when you hit the left arrow key it plays the sound but it will only play the sound once. if i hit the key again it doesnt play.
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 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: