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
https://www.mediafire.com/?oks90u0lr040tlo

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
r173
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
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
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests