SoundBug

0 favourites
  • 14 posts
  • Ashley

    I had his up at the forum once more but nobody could help me.

    Maybe you could, as you are (next to programming) also a sound engineer.

    I made this car sound engine but it is glitchy.

    It pops and clips as it is playing the sounds over and over.

    (Looping is not an option! when used it becomes even more glitchy)

    I tried every setting (Short sound file/Long Sound file)@ Every play rate.

    And now i can only draw the conclusion that it has nothing to do with how fast i am playing the sound every milisecond.

    It seems to me that either C2 cant keep up with the rate i am "playing" the sound at.

    Or that an automated limiter is popping and bleeping because it cant keep up.

    U would do me a great favor if u would look in to this.

    And i bet that for future racers made with C2 using engine sounds that have the playrate function, i am just the first to report this.

    My Capx

  • You have to be aware that changing the playrate only works in chrome (not FF, like looping).

    And also it doesn't sound exactly like changing the frequency of the sample (like it was doable in CC with audio2 I think).

    If you have glitches, it's possible that you're playing too many samples on the same channel or w/e and that they are simply distorting, because of the struggling frequencies.

    As usual, audio support in html5 is still messy, and I can't wait for FF and chrome to finaly agree on some standard or w/e and finally correct their code in their browsers.

    From what I've read on blogs and reports of meetings and other, both companies are aware of the audio issue but in a kind of wait.

    I'm not really sure what they are waiting for (rumors that it's being discussed in the wwwc for standardization) and as usual, it's probable microsoft won't follow it.

    IE9/10 will still be behind in matter of html5 support, but from all what I've seen, there's more and more dev/mainstream acceptance of chrome and FF as browsers/default browser, so imo, microsoft as more to lose this time, they won't just be able to rely on the fact that IE is the default browser with windows. I'm under the impression that it doesn't really matter anymore and that people won't hesitate do take the leap to have/use another browser to play comfortably html5 games.

    Back to the subject, I have downloaded your capx several times, but there are far too many custom plugins that I should install to my liking so I haven't looked into it.

  • Thank for your answer Kyatric.

    I use only chrome so that should not be the problem.

    It however is audio engine related.

    And as u suggest they need to tweek their browser audio engines.

    I will remove the to many plugins this evening and post a new capx after that.

    Then u can take a much appreciated look.

    And just to get a clear answer.

    Why does C2 not support pitch change?

    Is it on the to do list or are browsers not supporting it yet.

    Maybe someyhing else?

    Thanx for the support so far.

  • What browser support (as far is audio concerned) is already implemented in the audio plugin and does not even work from one browser to another (the replayrate/looping example between chrome and FF).

    Pitch change is not supported by browsers at all for now apparently.

  • Thanx for the insight on that!

  • Your example does not work at all for me, I hear nothing. Please make a simpler example with just playing audio if the audio is the problem, since I can't easily tell if one of the other events or a third party addon is causing a problem.

    And just to get a clear answer.

    Why does C2 not support pitch change?

    Construct 2's Audio object does not implement an audio engine. It just lets you use what the browser provides, and if the browser does not provide pitch change, the Audio object cannot have it either. You should be aware "playback rate" does not necessarily mean pitch change - it can also mean playing the sound in a sort of slow-motion effect, without affecting the pitch. Different browsers implement playback rate differently so it's not guaranteed you'll get either effect unfortunately.

  • Thanx for the explanation Ashley.

    I will make a very simple example.

    As for the playback rate.

    It does change pitch perfectly in chrome.

    Its like a time stretch without preserving the original pitch.

    So its perfect for simulating any kind of machine engine.

    My question was pointed to why there was no pitch option appart from the playback rate.

    But u have answered on both accounts.

  • I have uploaded a new simple Capx (No plugins, No extra events)

    And its for chrome.

    At first it maybe sounding allright but when u keep "using" the sound the blips and pops come up.

    (R) To accelerate

    (Space) To brake

    (Left & Right) Steering.

    Hope u can give me more insight.

  • Ashley & Kyatric

    I found this amazing site with allot of simple info to where the issue is at in different browsers.

    It explains the chrome issue i am having in detail.

    http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio

    Thought it might help C2 also.

  • I dont know if this has anything to do with chromes audio engine but wow, these effects bellow on this page are master to have in games.

    chromium.googlecode.com/svn/trunk/samples/audio/index.html

  • Savvy001, your .capx is insane! You're trying to play a new sound every tick, 60 times a second, and that's exactly what overloads and breaks the browser's audio engine. It only works in Chrome because it supports the Web Audio API which is a robust audio engine. You should try other browsers though, because it doesn't work at all in any browser other than Chrome.

    All I can suggest is play one looping sound on start of layout and adjust that dynamically. This is not a C2 bug, you're giving the browser way too much audio to handle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="smileys/smiley20.gif" border="0" align="middle" /> Insane <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thats all a part of trying to accomplish something on your own without the knowledge how to do it.

    And as the other web pages say on the internet: Chrome has problems with short audio files repeating fast.

    I have tested the same thing with every (1.0) (0.5) (0.3) (0.1) and below (0.00) seconds playback with long and short audio files.

    All have the same issue.

    Not just this insane 0.0001 setup.

    So thank u on this insight of having only 1 looping sample at start of layout.

    I will try to get a good result with it.

    Now i have learned more about the audio engine of chrome.

    I can start over again and try to get it right.

    And im happy that after all its not a C2 bug!

  • That solved it!

    I made a 15 sec synthesizer sound resembling a car engine on a constant pitch.

    I set that to start looping on start of layout.

    Re-set all the playrate settings in the capx and now it runs fine.

    Still only chrome but thats no problem.

    Thanx for the help on this! <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Glad to hear it's sorted :)

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