Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / how to play a sound while the same sound is already playing

Author
Message
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 16th Feb 2003 21:42
have a look at this code:

play sound 1
wait 1000
play sound 1

the sound takes more than 1 sec, so when the sound is played for the 2nd time, the sound stops and restarts

I want the sound of the first time to continue when it's played again... anyone who knows how I can do this (without having to use another sound number, which should increase loading time)?
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 16th Feb 2003 22:57
Uhm, o_O, you had the solution with the other sound number, I dont think loading on sound more or less makes all that much difference on performance, and I wouldnt know another way. Maybe if you use many sounds, make a loading screen that you see while loading, which takes away some of the drags of waiting for media to load.

Whatever I did I didn't do it!
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 17th Feb 2003 04:40
CLONE SOUND
This command will clone a sound into the specified Destination Sound Number. Cloning a sound will create a new sound that can be played like any other loaded sound, but uses the same WAV data of the original sound. The advantage of sound cloning is that one hundred sounds could be used with only a single instance of the sound data stored in memory. The Sound Number must be an integer value.

SYNTAX
CLONE SOUND Destination Sound Number, Source Sound Number
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 17th Feb 2003 13:41
thanks!

anyway, I already finished that program (it was only a little one, coz I was bored yesterday) without having the same sound simultaneously played. Here you can download it: http://http://pat.f2o.org/bernie/agogos.zip . You can use the mouse+up/down/left/right keys to look around, and the left and right mouse button to play on the instrument.

freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 17th Feb 2003 13:44

Login to post a reply

Server time is: 2024-05-18 10:39:32
Your offset time is: 2024-05-18 10:39:32