<commit_before>(function() {
  SAMPLE_SIZE = 2048;

  var adapter = function ( dance ) {
    this.dance = dance;
    this.context = window.audioContext ?
      new window.AudioContext() :
      new window.webkitAudioContext();
  };

  adapter.prototype = {
    load : function ( path, callback ) {
      var
        req = new XMLHttpRequest(),
        _this = this;

      this.source = this.context.createBufferSource();
      this.loaded = false;

      req.open( 'GET', path, true );
      req.responseType = 'arraybuffer';

      req.onload = function () {
        if ( _this.context.decodeAudioData ) {
          _this.context.decodeAudioData( req.response, function( buffer ) {
            _this.source.buffer = buffer;
          }, function( e ) {
            console.log( e );
          });
        } else {
          _this.source.buffer = _this.context.createBuffer( req.response, false );
        }
        _this.source.connect( _this.context.destination );
        _this.source.connect( _this.fft );
        _this.fft.connect( _this.proc );
        _this.proc.connect( _this.context.destination );
        _this.loaded = true;
        _this.dance.trigger( 'loaded' );
      };
      req.send();

      this.proc = this.context.createJavaScriptNode( SAMPLE_SIZE / 2, 1, 1 );
      this.proc.onaudioprocess = function() { _this.update.call( _this ); };
      this.source.connect( this.context.destination );

      this.fft    = this.context.createAnalyser();
      this.data   = new Uint8Array( this.fft.frequencyBinCount );
    },
    play : function () {
      var _this = this;
      (function play() {
        setTimeout(function() {
          _this.loaded ? _this.source.noteOn( 0.0 ) : play();
        }, 10);
      })();
    },
    stop : function () { this.source.noteOff(0); },
    getSpectrum : function () { return this.data; },
    getTime : function () { return this.context.currentTime; },
    update : function ( e ) {
      //this.fft.getByteFrequencyData( this.data );
      this.fft.getByteTimeDomainData( this.data );
      this.dance.trigger( 'update' );
    }
  };

  Dance.adapters.webkit = adapter;

})();<commit_msg>Fuck, don't commit time-domain webkit data.<commit_after>(function() {
  SAMPLE_SIZE = 2048;

  var adapter = function ( dance ) {
    this.dance = dance;
    this.context = window.audioContext ?
      new window.AudioContext() :
      new window.webkitAudioContext();
  };

  adapter.prototype = {
    load : function ( path, callback ) {
      var
        req = new XMLHttpRequest(),
        _this = this;

      this.source = this.context.createBufferSource();
      this.loaded = false;

      req.open( 'GET', path, true );
      req.responseType = 'arraybuffer';

      req.onload = function () {
        if ( _this.context.decodeAudioData ) {
          _this.context.decodeAudioData( req.response, function( buffer ) {
            _this.source.buffer = buffer;
          }, function( e ) {
            console.log( e );
          });
        } else {
          _this.source.buffer = _this.context.createBuffer( req.response, false );
        }
        _this.source.connect( _this.context.destination );
        _this.source.connect( _this.fft );
        _this.fft.connect( _this.proc );
        _this.proc.connect( _this.context.destination );
        _this.loaded = true;
        _this.dance.trigger( 'loaded' );
      };
      req.send();

      this.proc = this.context.createJavaScriptNode( SAMPLE_SIZE / 2, 1, 1 );
      this.proc.onaudioprocess = function() { _this.update.call( _this ); };
      this.source.connect( this.context.destination );

      this.fft    = this.context.createAnalyser();
      this.data   = new Uint8Array( this.fft.frequencyBinCount );
    },
    play : function () {
      var _this = this;
      (function play() {
        setTimeout(function() {
          _this.loaded ? _this.source.noteOn( 0.0 ) : play();
        }, 10);
      })();
    },
    stop : function () { this.source.noteOff(0); },
    getSpectrum : function () { return this.data; },
    getTime : function () { return this.context.currentTime; },
    update : function ( e ) {
      this.fft.getByteFrequencyData( this.data );
      this.dance.trigger( 'update' );
    }
  };

  Dance.adapters.webkit = adapter;

})();
{'fraction_non_alphanumeric': 0.1407528641571195, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 2.192537313432836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5483834', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1294, 'n_words': 245}