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

Smoother loops #49

Open
JoeGermuska opened this issue Jan 20, 2015 · 3 comments
Open

Smoother loops #49

JoeGermuska opened this issue Jan 20, 2015 · 3 comments

Comments

@JoeGermuska
Copy link
Member

Via @ThomasHelzle on #39

Not sure if that can be solved by soundcite: I get clicks and a short interruption on each loop. The same soundfile loops smoothly for instance with http://mediaelementjs.com/

This could probably be fixed by, instead of using pause/play (soundcloud popcorn) we could seek the clip to the start time.

Should definitely wait until after #48.

@ghost
Copy link

ghost commented Jan 22, 2015

I'm not getting any clicks in my tests, but there is a gap. I can't find any way to prevent it.

I looked into how a few other js libraries handle looping, and they all do a variation of what we're doing. None of them are perfectly gap-less, but some come closer. Example: http://www.schillmania.com/projects/soundmanager2/demo/api/#looping

MediaElementsJS doesn't have a working demo of their looping function, so I haven't been able to verify it's gap-less. If @ThomasHelzle has an example, I'd love to see it.

Are we hosting the popcorn library now? Could the gap be coming from the milliseconds it takes to reach an external library?

Another solution could be to have a short fade-in/fade-out when looping, so the gap is less abrupt.

@ghost
Copy link

ghost commented Jan 27, 2015

Sorry for the late reply.
I just tested it again and you are right, although I would have sworn I had gap-less and click-less audio loops in mediaelements when I first implemented it for my website, otherwise I would have used longer loops in some cases. Maybe it was only with the Flash fallback or something? Or it depends on the sounddevice used?
If it can't be helped it can't be helped - weird that something so basic isn't covered by all those medialibraries and audio implementations...

Thanks for trying !!!

Cheers,

Tom

@scott2b
Copy link
Member

scott2b commented Sep 8, 2016

Can anyone comment as to whether this is still an issue? The player does, in fact, use a seek to beginning rather than pause/play (see here and here. I would expect to hear differences depending on whether end end-time is defined before the sound actually ends. Also whether there are gaps at the beginning. Please let me know if this is still an issue or if I can close this.

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

No branches or pull requests

2 participants