Invalid audio playback time

0 favourites
  • 2 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • Problem Description

    audio playback time is not updated when playing the second music with the same audio tag after the first music has already stopped.

    Attach a Capx

    Description of Capx

    The capx has all the events to reproduce this bug.

    Press Q to play music 1.

    Press W to play music 2.

    Press E to play music 3.

    All musics are played with tag "music".

    Press S to stop tag "music".

    Steps to Reproduce Bug

    • Press Q to play music 1.
    • Now, press S to stop.
    • Press W to play music 2.
    • You will see that the Audio.PlaybackTime("music") is frozen, when music 2 is playing.

    Observed Result

    After playing and stopping music 1, Audio.PlaybackTime("music") is frozen when music 2 or 3 is played. However, if we stop and play music 1 again, Audio.PlaybackTime("music") will yield correct result, start counting from 0. Only the first music played can retrieve the playback time from Audio.PlaybackTime("music").

    Expected Result

    Audio.PlaybackTime("music") should return playback time of the new playing music, given that the previous music has already stopped.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES

    Operating System and Service Pack

    Win7 64 bits

    Construct 2 Version ID


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Previously all three of the Duration, PlaybackTime and Volume expressions would simply return a value for the first audio track with the given tag. That track could be a stopped track so this was actually working as intended, it would just be returning information for the first and stopped audio track when multiple tracks existed with the same tag. I think this demonstrates a valid use case for prioritising a playing track when deciding which track to return information for if there are multiple with the same tag. So I've changed this for the next build, hopefully that fixes it.

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