-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clipped sound effect playblack #1471
Comments
I preload my audio assets like this: this.load.audio('Intro', ['/Intro.ogg', 'Intro.mp3']); then I load and playback the audio like this; this.audioIntro = this.add.audio('Intro');
this.audioIntro.play(); |
Is anyone else experiencing these problems? |
If there is any latency involved in starting playback of the audio (i.e. decoding time, or seeking within a larger audio sprite) then it's entirely possible the timer will assume the sound has finished playing before it has even begun. I'm not sure of your exact set-up - this can be very specific to the actual audio files being used and the way they're encoded, so we'll need a proper test case to investigate further including the audio causing the problem. Feel free to re-open this if you can provide one. |
…ill stop playing instead of using a time based value. This is only used if the sound doesn't loop and isn't an audio sprite, but will give a much more accurate `Sound.onStop` event. It also prevents short audio files from being cut off during playback (#1471) and accounts for time spent decoding.
Actually I've just pushed up a change to the Sound class that should help with this issue massively. |
I have a problem which affects all browsers (IE a bit more). When i play a sound effect with a short duration (click effects for example) the sound effect sometimes is clipped or does not play at all.
The text was updated successfully, but these errors were encountered: