Audio preload memory leak

Bugs will be moved here once resolved.

Post » Fri Feb 15, 2013 2:33 am

Link to .capx file (required!):
http://pwnsoft.com/c2capx/AudioBug.capx

Steps to reproduce:
1. preload audio sound
2. add event: Audio - All preloads complete - Play audio sound on loop
3. Run layout

Observed result:
Memory climbs and CPU is almost maxed out on the browser instance. The audio does play as expected but it starts to distort and then slows down as the CPU is bogged down.

Expected result:
Sound preloads, plays on a loop, mutes, and then I can unmute when needed.

Browsers affected:
Chrome: yes = Version 24.0.1312.57 m
Firefox: yes = Version 18.0.2
Internet Explorer: Yes = Version 9.0.8112.16421
Node-Webkit: Yes = Version bundled with r118

Operating system & service pack:
Win7 SP1, x64

Construct 2 version:
r118

Other Steps:
I experimented quite a few times to find the problem, and I believe that the "Audio - All Preloads Complete" is the the culprit here. If I remove that event and just play the audio loop "On start of layout", the audio doesn't play right away when I want it, but it doesn't cause the same issues.
    
B
6
S
1
Posts: 11
Reputation: 1,072

Post » Fri Feb 15, 2013 5:37 pm

Closing as not a bug. The mistake is in your events: 'All preloads complete' is not a trigger, so you will be repeatedly playing sounds 60 times a second, which is the source of the memory leak and high CPU usage.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Tue Feb 19, 2013 2:21 am

Hmmm. OK, I'll go back and RTFM. Sorry to waste your time.
B
6
S
1
Posts: 11
Reputation: 1,072


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests