Invalid audio playback time

Bugs will be moved here once resolved.

Post » Thu Aug 14, 2014 5:26 pm

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
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: (use Chrome on Windows for best performance)

My sites:
Posts: 411
Reputation: 8,469

Post » Fri Aug 15, 2014 1:46 pm

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.
Scirra Founder
Posts: 25,104
Reputation: 199,830

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests