Audio Sound Initial Playback Delay

0 favourites
  • 8 posts
From the Asset Store
20 Songs for your game and 16 Fanfares, more than an hour of music!
  • it is my understanding that all SOUNDS in the SOUNDS folder should be automatically preloaded so that playback is instantaneous. However, every time I go to play a sound effect there is a brief lockup/delay in the whole project when the audio file is first begun. I even added an event that tells all other actions to wait until audio preloading is complete. The ONLY sound effect in the whole project now is no more than 10-11 seconds long.

    What could be causing the audio (and the whole project) to delay/lockup upon initial playback?


  • Having sounds work well without a preload hasn't been my experience. I'd recommend at least trying that. Otherwise, capx?

    EDIT: I think what you're thinking of is that sounds have to be downloaded completely before playing, whereas music can be streamed (the wording in the manual is a bit odd there and it seems to imply that sounds are ready to go, which they are not). This means that if a sound is not preloaded, it will be loaded the first time it plays, giving you the delay.

  • ultrafop - Yeah, it was my understanding that all sounds are preload at the start of layout...but that doesn't seem to be the case after all.

    I go ahead and preload the sound file on a Start Of Layout event line, and then, on a new event line, I prevent the rest of the project from advancing until that sound has finished preloading. But, when I call on the sound file to play, it still has that split-second freeze-up. So that's what is confusing me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like a weird quirk :/. So this is still happening even after setting the sound to preload (I'm guessing the added code about advancing the loading after the audio has loaded was tried after setting the preload)? I'm at a loss for what may be going on. My only other thought would be to wonder whether there's an added effect on the sound. I know that if I set certain effects incorrectly it can cause an entire project to run oddly.

  • Here's my .CAPX.

    I'm just as confused. On occasion, it works just fine. No delay.

    Ashley, may I inquire what it is that I'm missing in this case, please?

  • There shouldn't be any delay, but it will depend heavily on which browser and OS you use. Which OS/browser combinations have you tested and which are affected?

    The .capx isn't much use unless it follows bug report guideline-style requirements. I've seen threads in the past where people say some audio playback was causing a performance problem, but it turned out to be a bunch of events that ran in response to audio playback starting.

  • Ashley - Thank you for the info. much still to learn.

    I must admit I only use Chrome (I know better, but I don't usually test on Explorer or FireFox).

    I'll search so more for audio playback issues to see if I can find anything worthwhile.

    May I ask what events you speak of that caused issues in the past? Maybe that's what I'm doing and don't realize it... Though, I would be surprised if that's the case since I don't think I'm doing anything extraordinary...but then, I'm not adept at audio, either.

  • Rhindon It might be a Chrome for Android issue. I encountered a similar issue where the audio plugin was getting "stuck" on decoding my audio files. After searching, I found that Ashley had reported the issue to Google/Chromium project more than a year ago and it's only recently been marked as fixed.

    I can't include links yet, but you can hunt down the report on the Chromium tracker. It's issue 424174.

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