dancer.js icon indicating copy to clipboard operation
dancer.js copied to clipboard

Music plays too fast on ubuntu chrome

Open dikkietrom opened this issue 12 years ago • 6 comments

Other webaudio demos dont have this problem so it seems to be something in dancer.js

dikkietrom avatar Oct 22 '12 20:10 dikkietrom

Hmm, guessing it's the sample rate -- what version of Chrome and Ubuntu?

jsantell avatar Oct 23 '12 20:10 jsantell

Hi Jordan,

Chrome Version 21.0.1180.89 Ubuntu DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"

Ubuntu 32 bit version that is. Is there anything I can try out?

Thanks, Dennis

On Tue, Oct 23, 2012 at 10:56 PM, Jordan Santell [email protected]:

Hmm, guessing it's the sample rate -- what version of Chrome and Ubuntu?

— Reply to this email directly or view it on GitHubhttps://github.com/jsantell/dancer.js/issues/35#issuecomment-9717894.

dikkietrom avatar Oct 25 '12 04:10 dikkietrom

Great thank you, will look into it!

jsantell avatar Oct 25 '12 13:10 jsantell

for the time being I was doing this and get the same too fast playing thing. But when I remove the first connect the file plays fine and the analyser seems connected also. I dont see analyser used in your code but maybe it gives you a clue somehow.

    var playAudioFile = function (buffer) {
        var source = context.createBufferSource();
        source.buffer = buffer;
        source.connect(context.destination);                   <---------- first connect


        var analyser = context.createAnalyser();
        analyser.fftSize = 2048; // 2048-point FFT
        source.connect(analyser);                                <---------- 2nd connect
        analyser.connect(context.destination);

        source.noteOn(0); // Play sound immediately

    };

dikkietrom avatar Oct 25 '12 15:10 dikkietrom

No analyser, but there is a javascriptnode which may produce similar weirdness -- doing a large refactor and will definitely scope this out!

jsantell avatar Oct 25 '12 15:10 jsantell

I've encountered this problem too - at first I thought I was doing something wrong, but then I compared and found out that it did it in the dancer.js example too.

shoofle avatar Apr 29 '13 18:04 shoofle