question about "preload sound"

Get help using Construct 2

Post » Thu Apr 12, 2012 11:29 pm

Is the preload sound feature a way to load sound effects into ram so theres no pause the first time you play it?

So, for most games, should we at start of frame, preload all the sound effects for that frame?
B
46
S
8
G
4
Posts: 414
Reputation: 6,830

Post » Fri Apr 13, 2012 9:30 am

RAM isn't important, it starts the audio downloading so there's no pause while it downloads the first time you play. More information in the manual.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Apr 13, 2012 12:50 pm

"To speed up the loading time and start the game sooner, audio is downloaded or streamed on-demand during the game. In other words, nothing is downloaded until a Play action starts playing an audio file. Then, if the audio file is in the Music folder it starts streaming from the server; if in the Sounds folder, it starts downloading and will play when finished downloading. This also helps minimise the bandwidth requirement on the server since unused audio is never downloaded. However, it can introduce a delay before audio plays for the first time. The delay on first play is a one-off, because after the first play the sound is already downloaded and can be played immediately if played a second time.

You can also use the Preload action to start downloading an audio file without actually playing it. This can be done on Start of layout to start downloading a few important sound effects so there is no delay when they are played for the first time. However it is entirely optional (all games will work without any preloading at all), and it should not be over-used since preloading too many sound effects on startup can slow down browsers with too much downloading and result in no sound effects playing at all for a while."

Big up for manual.
B
15
S
5
G
1
Posts: 40
Reputation: 2,026

Post » Fri Apr 13, 2012 4:04 pm

Thanks guys, and manual! I'll be sure to check with it from now on before posting a question. :)
B
46
S
8
G
4
Posts: 414
Reputation: 6,830

Post » Wed Jul 24, 2013 4:30 pm

If I preload a sound, then use it and then change layout, I have to preload again it if I want to use in the new layout or it is not necessary?
Thx in advance.
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Jul 24, 2013 5:03 pm

You only need to preload once. Preloading is global to the entire game, and is not affected by changing layout.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Jul 24, 2013 8:38 pm

K.

B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Jan 08, 2014 1:17 am

Is it possible that when a sound loads, it not only causes a delay in the sound, but also freezes the layout itself.. especially if the sound is large (2mb+)?

Im getting a weird intermittent freezing on my game and it may be possible (still testing) it is resolved when i remove the audio object completely so im just curious how that all works.

Thanks!
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
23
S
7
G
3
Posts: 375
Reputation: 4,797


Return to How do I....?

Who is online

Users browsing this forum: abdalghani, Kagubro and 21 guests