C2 Audio Ruined my Life

0 favourites
  • 10 posts
From the Asset Store
A cool way for kids to write and practice English Alphabets
  • 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.


  • 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?

  • NO HEALTH = GOTO "END" (event sheet)

    "AUDIO STOP "Music"

    GOTO START (event sheet)

    AUDIO PLAY "Music"(tag"looping")

  • 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...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ^^^ That is a funny game. :)

  • 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.

  • 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

  • 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.

  • 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!


    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 $$$$$

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)