C2 audio broken - Starts jittering more the longer you play

0 favourites
  • 10 posts
From the Asset Store
A set of board games to make your day joyful. Play, Enjoy, Relax
  • Problem Description

    So I've lately been encountering issues with audio. Especially on mobile. I'm making a music game, so it's quite devestating to find that the audio clarity and playback speed gets gradually lowered the longer the playsession. This happens on all devices, and all platforms. At first I thought maybe it's inconsistent internet, but I find this happening even on exported NWjs/Cordova projects. I also did tests to ensure that it's not just the fact I'm switching songs around too rapidly causing the issue. This always eventually happens, even if you just play one track, and wait for minutes at a time before changing. I find it seems directly related to amount of times tracks are changed, and processing power.

    This becomes apparent way faster on mobile over PC. On my S7 this becomes a problem already after maybe 20 seconds of tapping. After about 1 minute the music's inaudable. On a beast of a desktop I have to hold in the mouse for maybe up to 2-5 minutes to recreate the issue. Considering I'm targeting mobile though... This is a bug so severe I have to cancel the game if it can't be fixed. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Attach a Capx

    https://drive.google.com/file/d/0B1n4Fd ... sp=sharing

    Description of Capx

    Includes 4 tracks that gets unloaded, stopped and played at random when in touch every 0.05 seconds. Changing it to 0.1, 0.2, 1, 2 will trigger the same results just take longer.

    Steps to Reproduce Bug

    • Preview on device and browser of choice
    • Hold in touch/left mouse button on given device
    • Notice the audio becoming more jaggy and inaudable as it goes on. Keep doing this long enough and it should turn into nightmare fuel.

    Observed Result

    Audio quality and playback speed gets gradually reduced. Almost as if the unloading or stopping of music doesn't work

    Expected Result

    It should be clean audio till the end of time. The player shouldn't have to reboot the game every 15 minute to enjoy my game.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (Inconclusive. Audio playback takes so long to start that it would take ages to test on my beefy computer. Sorry...)

    Operating System and Service Pack

    Win 7 SP1

    Construct 2 Version ID

    247

  • I know the work around for this.. it sounds weird, but it works.

    create a short 1 second of silent audio.

    Add a System event to trigger playing it Every 1 second (not looping)

    that should do it, it worked for me.. don't ask why!

  • jobel Huh... I gotta test that tomorrow! ö_o

  • it definitely happens in cordova>cocoonIO>Andriod and that seemed to fix it.

    my audio skipped, distorted, muted, repeated non-stop etc.. but what I thought was weird was that none of the Music folder sounds were effected. That silent audio fixed the problem.

  • The upload throws a javascript error at 0.05.

    0.25, not so much.

    Moved files to sounds folder. Outcome was far worse.

    As in don't even try it. Had to manually close Chrome.

    W10

    Dell P.o.s.

  • jobel Hmm not sure we have the same issue then. This bug refers especially to the music folder. Was the silent audio file placed in the sound or music folder?

    Edit: Tried it. Didn't fix the issue for me, even when I had one silent in both music and sound.

  • Gonna need a statement on this issue soon. Thanks Ashley

  • It turns out we leaked an audio node when unloading music tracks. I'm not sure why this would degrade audio quality (why would extra silent nodes affect anything?) but it's definitely a problem, and properly cleaning up the nodes seems to fix the problem.

    Rather than wait for the next build you can try pasting this updated runtime.js file for the Audio plugin in to your install directory & restart C2: https://www.dropbox.com/s/3bh36yk099y4gzh/audio-runtime-r248.zip?dl=0

    Let me know if that solves it.

  • Ashley Yes that seems to have fixed it. I'm unable to recreate the issue now. I'm glad it turned out to be an easy fix! Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Glad to hear it's sorted!

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