Why does the music not always play for me?

Get help using Construct 2

Post » Thu Oct 20, 2016 7:53 pm

I don't know the reason why the audio isn't playing

I have added the "Preload" in the layout before and in the layout where the music should play

This is how it looks on the Layout before the layout where the music plays
Image

And this is how it looks on the layout where the music plays

Image

Is there any reason why the music isn't playing?

Sometimes it starts playing just randomly, then it disappears

I have added the .ogg musics in the Music folder

Image

With my best regards and I really hope I can get this solved
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Fri Oct 21, 2016 1:36 pm

Bumping this thread in hopes to get this solved! :)
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat Oct 22, 2016 12:03 pm

Bumping again in hope for luck
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat Oct 22, 2016 2:42 pm

You could use Audio.All preloads complete to know when the audio has finished loading, rather than using Wait and guessing that it only takes 0.1 seconds.
ImageImageImage
B
71
S
22
G
249
Posts: 3,763
Reputation: 138,577

Post » Sat Oct 22, 2016 5:54 pm

blackhornet wrote:You could use Audio.All preloads complete to know when the audio has finished loading, rather than using Wait and guessing that it only takes 0.1 seconds.


Reason why I am using wait 0.1 is because I experienced that the music from last layout carried over to the new one
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat Oct 22, 2016 9:34 pm

You'd have to post a sample, as there is no way all of that should be needed.
ImageImageImage
B
71
S
22
G
249
Posts: 3,763
Reputation: 138,577

Post » Mon Oct 24, 2016 4:54 pm

blackhornet wrote:You'd have to post a sample, as there is no way all of that should be needed.


Sorry I cannot post a sample since this is at the end of the game (everything else is done).

Also, can I use Audio preload on like the startup menu, then its preloaded the entire game?
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Mon Oct 24, 2016 5:18 pm

C2 has a "Preload sounds" property for the project itself, so you shouldn't even need to do this manually anymore. Just turn that on and the problem should go away.
ImageImageImage
B
71
S
22
G
249
Posts: 3,763
Reputation: 138,577

Post » Sun Nov 13, 2016 5:14 am

I have the same problem when I access my game through mobile browser and have conclude :

1. it seems the loader from C2 will still go to the next layout even though the preload for music not complete, and makes the game unable to play it (I'm already using project properties for preload sounds and preload the sound individually)
2. when I use the conditions 'all preloads complete', it get stuck and not go to the next layout, hinting that the music still not yet ready. I don't know maybe my internet connection was too slow.
3. it needs to refresh the browser multiple times to actually preload all the music until the loader don't appear when we refresh it again. and all sounds will be able to play it correctly.

I want to know how to solve this so the game preload all the sound completely (without getting stuck) before go to the next layout.

sorry for my poor english
B
11
S
3
Posts: 6
Reputation: 691

Post » Sun Nov 13, 2016 6:03 am

1 disabling ad-block when u are previewing if you have it installed might solve it. (adblock automatically blocks C2 games, causing them to Load with red bar and stop at 80-90%, and even if loads 100% there might be some items skipped.)

2 trying mozzila/opera/IE and not chrome might solve it.

3 if we dont know what else is in your guys event system that can interact with your sounds, we cant solve it.

4 @blackhornet is right.

hope it helped you. there are various reasons why sound wouldn't play on ur project. but most likely as i can see its bad event system logic nothing seems wrong with audio plugin lately, and i wold'v notice them also, since i had some audio projects(massive numbers of sounds and music files) tested this week.


Edited: might be that is because of some sort of browser cache error, try clearing ur Browser History Cache data(downloaded media and images only before or since the time you started previewing the project your working on.)
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,005


Return to How do I....?

Who is online

Users browsing this forum: Hassan Hackmi and 6 guests