After restart, sound still playing for few ticks - Is this a bug?

0 favourites
  • 5 posts
From the Asset Store
In this template the music plays without looping in your game
  • So, I stopped the music tag "myMusic" both on start and on end of layout. Then on start of layout... below the stop "myMusic" tag, I replay the sound by verifying if the audio tag is not playing.

    Somehow the sound "myMusic" continues to play for few ticks if you RESTART the layout,

    so the condition => 'audio "myMusic" is not playing' never goes through since it still detects "myMusic" playing.

    This happens only when you use restart layout or use "Go to layout" on the same layout.

    Is this a bug or what? How can the sound be stopped without delaying any restart?

  • Ashley

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's not enough information here to be able to determine if it's a bug. If you think it is a problem with Construct please file an issue following all the guidelines, as we need all that information to be able to help.

  • I just recreated this project for fun and the weird thing is that it seems to work every other time - i.e. start the project:

    1. music plays
    2. press space
    3. music stops
    4. layout restarts
    5. music doesn't restart
    6. press space
    7. music stops
    8. layout restarts
    9. music restarts
    10. repeat

    I even inserted a "wait" as the first action in event 3, and regardless of how long I wait, the same behaviour is observed - perhaps there's a clue there?

  • citron2010

    Hello, thanks for testing from your side.

    Yes, I noticed that the sound doesn't stop playing instantly, after using

    => stop "audioTag"

    A wait of 0.05-0.1s is working after stopping the audio and checking again if it is still playing, else it will just detect it playing a few times.

    But there's no guarantee how it will work on old devices

    Ashley

    I just filed the bug, thanks for the link

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