Permalink
Browse files

added a default delay to .play/.stop - from kimasendorf

  • Loading branch information...
jeromeetienne committed Sep 2, 2014
1 parent 6e68bcc commit c9aac5edbde1f26bb286433aba4b5ec8be117320
Showing with 4 additions and 0 deletions.
  1. +2 −0 build/webaudiox.js
  2. +2 −0 examples/helpers/webaudiox.gamesounds.js
View
@@ -969,11 +969,13 @@ WebAudiox.GameSoundSource = function(gameSound, options) {
// start the sound now
utterance.play = function(delay){
delay = delay !== undefined ? delay : 0
source.start(delay)
return this
}
utterance.stop = function(delay){
delay = delay !== undefined ? delay : 0
source.stop(delay)
// TODO What if the sound is never stopped ?
// - the list of function will grow in the loop
@@ -276,11 +276,13 @@ WebAudiox.GameSoundSource = function(gameSound, options) {
// start the sound now
utterance.play = function(delay){
delay = delay !== undefined ? delay : 0
source.start(delay)
return this
}
utterance.stop = function(delay){
delay = delay !== undefined ? delay : 0
source.stop(delay)
// TODO What if the sound is never stopped ?
// - the list of function will grow in the loop

0 comments on commit c9aac5e

Please sign in to comment.