Skip to content

Commit

Permalink
Make sounds fire at the beginning of the second rather than the end
Browse files Browse the repository at this point in the history
  • Loading branch information
bhickey committed May 5, 2012
1 parent e755428 commit 0d651ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dipclock.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,17 @@ var DipClock = function(year, season, spring, fall, writing, wait, sound, end_ye
this.resetClock();
this.init();
this.pauseCount = 0;
this.prefetch();
};

if (sound === true) {
DipClock.prototype.prefetch = function() {
if (this.sound === true) {
for (var key in SOUNDS) {
SOUNDS[key].file.load();
SOUNDS[key].limit += 1000;
}
}
};
}

DipClock.prototype.isOver = function() {
return this.year >= this.end_year;
Expand Down

0 comments on commit 0d651ae

Please sign in to comment.