C2 Audio Ruined my Life

Discussion and feedback on Construct 2

Post » Sat Dec 10, 2011 9:51 pm

Just joking, but is driving me to drink.

This music problem has been a problem from the start. The Audio
object is fairly simple to understand, but once you start your
music it is impossible to stop.

I have two pieces of music joined together, after a couple of minutes
the second piece of music fades in, if the player dies then "End"
screen and game starts over. The problem is that the music starts
with the first piece of music, but the second piece is still playing
and superimposes over the first piece, Nothing will stop the second
piece of music from playing, not "STOP" not "MUTED" Nothing stops
the music, Nothing. I use Google Chrome as my Browser, and the music
file is "ogg" also Win XP.

I have also used Game Maker HTML5, and that programme has no problems
at all with Music Files.

HELP PLEASE.
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Sat Dec 10, 2011 10:21 pm

Think you can post a screen-capture of your events? Because who knows what's going on based on your vague and/or ambiguous description?
B
19
S
3
G
2
Posts: 148
Reputation: 1,945

Post » Sun Dec 11, 2011 5:31 am

NO HEALTH = GOTO "END" (event sheet)
"AUDIO STOP "Music"

GOTO START (event sheet)
AUDIO PLAY "Music"(tag"looping")
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Sun Dec 11, 2011 8:33 am

I have no ideal about your problem, but i have a small problem with sound too. My game Santa at the menu will have the bell sound looping, it's looping on Chrome, but didn't on Firefox, strange...
B
35
S
9
G
5
Posts: 174
Reputation: 5,916

Post » Sun Dec 11, 2011 4:25 pm

^^^ That is a funny game. :)
B
69
S
11
G
6
Posts: 324
Reputation: 8,321

Post » Sun Dec 11, 2011 5:52 pm

Can you post a .capx which can't stop audio? Last I tested it it was working OK.

Firefox can't loop audio, it's a browser limitation.

Browsers have really terrible audio support and to try and make it work as well as possible the Audio object currently uses three different audio APIs. It's a bit of a nightmare, and patchy browser support means it still doesn't entirely work. It's something HTML5 needs to improve on, it's not something we can fix our end.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620

Post » Sun Dec 11, 2011 11:45 pm

The capx file would have to be my whole game, and I would prefer not to at this stage, but it is really as simple as the above mentioned.

I have made the exact same game in Game maker HTML5 with no problems
with sound at all.

Many Thanks
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Sun Dec 11, 2011 11:52 pm

If you don't want to post the capx, it's best to try to make a very small project and replicate the problem. You might think what you typed out here is an adequate representation, but some problems are caused by the tiniest mistake that you might never notice yourself, so it really is best to post something.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Dec 11, 2011 11:52 pm

@ozziedave, I just made a blank project which plays some music and stops it on a key press and it works fine in all browsers. Can you make a blank project where it doesn't work? That's always better than a full project, usually I ask people not to send me their whole projects anyway because it's such hard work to find problems in them!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620

Post » Tue Dec 13, 2011 8:26 am

LIFE IS ON TRACK AGAIN THANKS TO KYATRIC:

I looked at "LOL Audio Player capx file. The Answer:

AUDIO|Preload Level_1_2
AUDIO|PLAY Level_1_2(tag"Music")
AUDIO|SET "Music" looping

To stop the Music : AUDIO|STOP "Music"

Life's good again $$$$$ozziedave2011-12-13 08:26:54
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 16 guests