[r226] audio play-at-object bug

Bugs will be moved here once resolved.

Post » Fri Apr 01, 2016 4:11 pm

Problem Description
In Chrome and nw.js (and partially in Firefox), demanding an audio file to play at an object causes a hesitation in all playing audio - for the first play call only.

Attach a Capx
link to capx

Description of Capx
A background audio loop plays; there is a listener object and another object to play the sound from. When you press the space-bar an audio file is played from the second sprite.

Steps to Reproduce Bug
  • Run the layout, press space bar

Observed Result
In Chrome and nw.js the first press of the space bar causes the background audio loop to pause momentarily, while the "thump" audio does not play. Subsequent audio calls work correctly.

Expected Result
The audio should play at first demand without causing other audio files to hesitate.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES, partially)
  • Internet Explorer: (NO)
  • nw.js (YES)

Operating System and Service Pack
w10 x64

Construct 2 Version ID
r226 64 bit
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Tue Apr 12, 2016 12:24 pm

I can't reproduce this in Firefox or Edge, only Chrome, so it's really a quirk of Chrome than a problem with the C2 engine. I think what is happening is the browser lazy-loads the positioned audio playback engine the first time you play a positioned sound, which takes a moment. I think you can work around this just by playing a positioned sound on startup, maybe on the menu/splash screen.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Tue Apr 12, 2016 3:40 pm

Yeah - that's a good work-around, but it probably should be documented somewhere so it doesn't catch people out in future, at least until it's fixed in Chrome.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests