Search code examples
jquerysoundmanager2

Gap less playback through the soundmanager


I am using soundmanager2 in my project. it have loops so the sound file is repeated with the loops.. But unfortunately there is a gap in between when the loop iterates, well this loop gap is small in the Chrome browser, but there is more gap when i am browsed my project in the Safari or ipad,,,, in short my aim is to achieve continuously sound it hears like a long song.. any help is appreciable

<script type="text/javascript" src="script/soundmanager2.js"></script>
    <script type="text/javascript">
        var loops = 3 ;
        var looped = 0;


        soundManager.flashVersion = 9;
        soundManager.url = 'swf/';
        soundManager.onready(function () {

            soundManager.createSound({
                id: "sound1",
                url: "audiofiles/sound1.wav",
                stream: true,
               autoPlay: true,
                multiShot: true,
                onfinish: function () {
                    if (looped < loops) {
                        soundManager.play('sound1');
                        looped++;
                    } else {
                        looped = 0;
                    }
                }
            });
            soundManager.play('sound1', { loops: 3 });
        });

    </script>

Solution

  • I think you have to Use Web Api token

    See Here