Audio (Web Audio API) reports wrong sound file duration when audio is being played from 'Music' folder (as opposed to 'Sound') in Android Chrome. When used in conjunction with playback 'seek' actions, it causes very inaccurate positioning.
Attach a Capx
Description of Capx
Two Sprite 'buttons'; one plays Audio from 'Sounds' folder, another from 'Music' folder. Note that, in actuality, the audio files are located in the 'Music' folder, but the Audio will still play it even though the Audio 'Play' action specifies to play it from the folder 'Sound'.
The audio is 35 seconds long.
Steps to Reproduce Bug
When audio is played in 'Music' folder, debugger reports wrong duration. When seeking is attempted, the playback position is wrong.
This bug happens only in Android Chrome.
Android Firefox, Windows Chrome, Windows Firefox, Safari reports correct duration and seeks properly.
-Audio should report actual audio file duration in debugger.
-When 'seeking' to a playback position, the seeking should be the same as other platforms.
Operating System and Service Pack
Windows 7 SP1
Construct 2 Version ID
The fact this happens only on Chrome for Android strongly indicates a problem with Chrome and not Construct 2's code, but I will leave this open for investigation later.
Develop games in your browser. Powerful, performant & highly capable.
I can't reproduce any issue in Chrome for Android (currently v52) - the debugger is fiddly on mobile so I just added a text object showing the duration and playback time (.capx: https://dl.dropboxusercontent.com/u/15217362/sound_music_bug_2016_08_31.capx) and it displays the correct duration and playback position.
I know that Google have been doing some heavy work on the audio engine in Chrome for Android recently, and v52 made some big changes, so maybe check your Chrome is up to date and try again. If not try Chrome Dev for Android which is newer. I think you were seeing a problem on an older version that was subsequently fixed, so closing this report.