[r226] audio play-at-object bug

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)