Custom Music Start Fails After Changing Track

Issue #188 resolved
Enthalpy created an issue

Suppose you play a music track with a custom loop start time, let it play once, proceed to a frame that changes the music, and then play the same track. It will loop as if the custom loop start time was zero. See link for example.

Upon accessing the sound object by the sound manager’s getSoundById object, I find that the position attribute takes on the value of the custom loop start time after we’ve seen it loop correctly, but not after we’ve seen it loop incorrectly. This suggests a problem in the SoundManager library. This is likely related to the fact that according to their documentation “for multiShot cases, only the first play instance's position is tracked in Flash.” So to fix this, we’d likely need to either switch out the library or switch SM2 from using Flash technology to using HTML5 technology. ThePaschs' forays into the sound system would likely be useful here.

Comments (2)

  1. ThePaSch

    It seems like the switch to Howler has inadvertently fixed this issue; at least custom looping seems to work properly for me in the test trial given. I think this can be closed.

  2. Log in to comment