Skip to content
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

Looping Music on Android target is not seamless. #186

Closed
neurofuzzy opened this issue Jul 26, 2014 · 2 comments
Closed

Looping Music on Android target is not seamless. #186

neurofuzzy opened this issue Jul 26, 2014 · 2 comments

Comments

@neurofuzzy
Copy link

I am noticing that looping of ogg files are not seamless… I have a few 30 second or so music files that are seamlessly looped. They play back fine on flash and ios, but on android they seem to loop about a half-beat too soon, as in the last eighth of a second or so is chopped off.

@jgranick
Copy link
Member

This must be an issue with the Android OpenAL implementation, not sure I have an easy fix for this at our level. Perhaps we could keep an eye on the OpenAL ports for Android to see if there's a fix there. Thank you 😄

@JoeCreates
Copy link

JoeCreates commented Nov 16, 2018

@jgranick I think we should reopen this. The issue is present on windows and neko builds also. (I'm testing with lime 7, though. If this was fixed since then disregard this.)

I've been able to fix it by using openal's source AL_LOOP property instead of the lime way in NativeAudioSource. It seems this implemented it's own method of looping to account for the number of loops, but this introduces a slight glitch, whereas setting AL_LOOP is seamless (although I'm not sure you could then count the loops).

To make this work I had to comment out some lines in NativeAudioSource#timer_onRun to stop the sound from ending.

For testing I also used simple seamless square wave as this makes the glitch more noticeable. (https://www.dropbox.com/s/uh65z4ekaorsdnk/beeploop.ogg?dl=0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants