Looping track continuously in SoundManager 2

  • 1
  • Question
  • Updated 8 years ago
I just posted a comment to the topic 'Looping tracks in SoundManager 2'. Not sure if you will see the comment, so I'll post it here...

I have the same problem trying to create a continuous loop. First, let me thank you for the soundmanager tool - overall, it is great, and I appreciate your efforts.

I've tried several ways to use the onfinish() function, but can only get the sound to loop once. There has to be an easier way. I was using soundmanager v1 with the builtin loop function before, and it worked fine. I realize that the looping is not 'seamless', but for a long background track with fading, it is not an issue. Why was a feature that was working in version 1 removed from version 2? Please add this feature back. You did a good job in the original docs warning us of the limitations of the feature - you did not need to remove it just because some people might not like the way it worked. The rest of us were happy.

Thanks for listening,
Roy.
Photo of roy

roy

  • 3 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Scott

Scott, Official Rep

  • 3873 Posts
  • 253 Reply Likes
Official Response
The original question here I think is a repost, the same question is discussed and answered here! Long story short, due to the way onfinish() works with SM2 sounds, you can use a setTimeout() as bum51 noted to get continuous looping working as expected; my link explains it further.

For the record I'd like to fix this so you can call play() within onfinish() and loop endlessly etc., but I need to look at some timing issues and make sure it won't break anything else.