dist/howler.js
function(event, id, msg) {
      var self = this;
      var events = self['_on' + event];

      // Loop through event store and fire all functions.
      for (var i=events.length-1; i>=0; i--) {
        // Only fire the listener if the correct ID is used.
        if (!events[i].id || events[i].id === id || event === 'load') {
          setTimeout(function(fn) {
            fn.call(this, id, msg);
          }.bind(self, events[i].fn), 0);

          // If this event was setup with `once`, remove it.
          if (events[i].once) {
            self.off(event, events[i].fn, events[i].id);
          }
        }
      }

      // Pass the event type into load queue so that it can continue stepping.
      self._loadQueue(event);

      return self;
    }
function(event, id, msg) {
      var self = this;
      var events = self['_on' + event];

      // Loop through event store and fire all functions.
      for (var i=events.length-1; i>=0; i--) {
        // Only fire the listener if the correct ID is used.
        if (!events[i].id || events[i].id === id || event === 'load') {
          setTimeout(function(fn) {
            fn.call(this, id, msg);
          }.bind(self, events[i].fn), 0);

          // If this event was setup with `once`, remove it.
          if (events[i].once) {
            self.off(event, events[i].fn, events[i].id);
          }
        }
      }

      // Pass the event type into load queue so that it can continue stepping.
      self._loadQueue(event);

      return self;
    }
function ( event , id , msg ) { var self = this ; var events = self [ '_on' + event ] ; // Loop through event store and fire all functions. for ( var i = events . length - 1 ; i >= 0 ; i -- ) { // Only fire the listener if the correct ID is used. if ( ! events [ i ] . id || events [ i ] . id === id || event === 'load' ) { setTimeout ( function ( fn ) { fn . call ( this , id , msg ) ; } . bind ( self , events [ i ] . fn ) , 0 ) ; // If this event was setup with `once`, remove it. if ( events [ i ] . once ) { self . off ( event , events [ i ] . fn , events [ i ] . id ) ; } } } // Pass the event type into load queue so that it can continue stepping. self . _loadQueue ( event ) ; return self ; }
Emit all events of a specific type and pass the sound id.
@param  {String} event Event name.
@param  {Number} id    Sound ID.
@param  {Number} msg   Message to go with event.
@return {Howl}
Emit all events of a specific type and pass the sound id .