<commit_before>var gAudio = AudioContext ? new AudioContext : new webkitAudioContext;

function playRotateSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.start(start);
  osc.frequency.linearRampToValueAtTime(220, start);
  osc.frequency.linearRampToValueAtTime(440, start + 0.2);
  osc.stop(start + 0.2);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.19);
}

function playSlideSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.start(start);
  osc.frequency.linearRampToValueAtTime(220, start);
  osc.frequency.linearRampToValueAtTime(440, start + 0.1);
  osc.stop(start + 0.1);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.09);
}

function playDropSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.frequency.value = 330;
  osc.start(start);
  osc.stop(start + 0.1);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.09);
}<commit_msg>Fix timing in sound effects<commit_after>var gAudio = AudioContext ? new AudioContext : new webkitAudioContext;

function playRotateSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.start(start);
  osc.frequency.linearRampToValueAtTime(220, start);
  osc.frequency.linearRampToValueAtTime(440, start + 0.2);
  osc.stop(start + 0.2);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.2);
}

function playSlideSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.start(start);
  osc.frequency.linearRampToValueAtTime(220, start);
  osc.frequency.linearRampToValueAtTime(440, start + 0.1);
  osc.stop(start + 0.1);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.1);
}

function playDropSound(audio) {
  var osc = audio.createOscillator();
  var gain = audio.createGain();
  var start = audio.currentTime;

  osc.connect(gain);
  gain.connect(audio.destination);

  osc.frequency.value = 330;
  osc.start(start);
  osc.stop(start + 0.1);

  gain.gain.linearRampToValueAtTime(0, start);
  gain.gain.linearRampToValueAtTime(0.1, start + 0.01);
  gain.gain.linearRampToValueAtTime(0, start + 0.1);
}
{'fraction_non_alphanumeric': 0.13859480269489893, 'fraction_numerical': 0.034327879371190244, 'mean_word_length': 4.763401109057301, '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': '4677491', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1125, 'n_words': 186}