function() {
      var self = this;
      var args = arguments;
      var vol, id;

      // Determine the values based on arguments.
      if (args.length === 0) {
        // Return the value of the groups' volume.
        return self._volume;
      } else if (args.length === 1 || args.length === 2 && typeof args[1] === 'undefined') {
        // First check if this is an ID, and if not, assume it is a new volume.
        var ids = self._getSoundIds();
        var index = ids.indexOf(args[0]);
        if (index >= 0) {
          id = parseInt(args[0], 10);
        } else {
          vol = parseFloat(args[0]);
        }
      } else if (args.length >= 2) {
        vol = parseFloat(args[0]);
        id = parseInt(args[1], 10);
      }

      // Update the volume or return the current volume.
      var sound;
      if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) {
        // If the sound hasn't loaded, add it to the load queue to change volume when capable.
        if (self._state !== 'loaded'|| self._playLock) {
          self._queue.push({
            event: 'volume',
            action: function() {
              self.volume.apply(self, args);
            }
          });

          return self;
        }

        // Set the group volume.
        if (typeof id === 'undefined') {
          self._volume = vol;
        }

        // Update one or all volumes.
        id = self._getSoundIds(id);
        for (var i=0; i<id.length; i++) {
          // Get the sound.
          sound = self._soundById(id[i]);

          if (sound) {
            sound._volume = vol;

            // Stop currently running fades.
            if (!args[2]) {
              self._stopFade(id[i]);
            }

            if (self._webAudio && sound._node && !sound._muted) {
              sound._node.gain.setValueAtTime(vol, Howler.ctx.currentTime);
            } else if (sound._node && !sound._muted) {
              sound._node.volume = vol * Howler.volume();
            }

            self._emit('volume', sound._id);
          }
        }
      } else {
        sound = id ? self._soundById(id) : self._sounds[0];
        return sound ? sound._volume : 0;
      }

      return self;
    }
function() {
      var self = this;
      var args = arguments;
      var vol, id;

      // Determine the values based on arguments.
      if (args.length === 0) {
        // Return the value of the groups' volume.
        return self._volume;
      } else if (args.length === 1 || args.length === 2 && typeof args[1] === 'undefined') {
        // First check if this is an ID, and if not, assume it is a new volume.
        var ids = self._getSoundIds();
        var index = ids.indexOf(args[0]);
        if (index >= 0) {
          id = parseInt(args[0], 10);
        } else {
          vol = parseFloat(args[0]);
        }
      } else if (args.length >= 2) {
        vol = parseFloat(args[0]);
        id = parseInt(args[1], 10);
      }

      // Update the volume or return the current volume.
      var sound;
      if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) {
        // If the sound hasn't loaded, add it to the load queue to change volume when capable.
        if (self._state !== 'loaded'|| self._playLock) {
          self._queue.push({
            event: 'volume',
            action: function() {
              self.volume.apply(self, args);
            }
          });

          return self;
        }

        // Set the group volume.
        if (typeof id === 'undefined') {
          self._volume = vol;
        }

        // Update one or all volumes.
        id = self._getSoundIds(id);
        for (var i=0; i<id.length; i++) {
          // Get the sound.
          sound = self._soundById(id[i]);

          if (sound) {
            sound._volume = vol;

            // Stop currently running fades.
            if (!args[2]) {
              self._stopFade(id[i]);
            }

            if (self._webAudio && sound._node && !sound._muted) {
              sound._node.gain.setValueAtTime(vol, Howler.ctx.currentTime);
            } else if (sound._node && !sound._muted) {
              sound._node.volume = vol * Howler.volume();
            }

            self._emit('volume', sound._id);
          }
        }
      } else {
        sound = id ? self._soundById(id) : self._sounds[0];
        return sound ? sound._volume : 0;
      }

      return self;
    }
function ( ) { var self = this ; var args = arguments ; var vol , id ; // Determine the values based on arguments. if ( args . length === 0 ) { // Return the value of the groups' volume. return self . _volume ; } else if ( args . length === 1 || args . length === 2 && typeof args [ 1 ] === 'undefined' ) { // First check if this is an ID, and if not, assume it is a new volume. var ids = self . _getSoundIds ( ) ; var index = ids . indexOf ( args [ 0 ] ) ; if ( index >= 0 ) { id = parseInt ( args [ 0 ] , 10 ) ; } else { vol = parseFloat ( args [ 0 ] ) ; } } else if ( args . length >= 2 ) { vol = parseFloat ( args [ 0 ] ) ; id = parseInt ( args [ 1 ] , 10 ) ; } // Update the volume or return the current volume. var sound ; if ( typeof vol !== 'undefined' && vol >= 0 && vol <= 1 ) { // If the sound hasn't loaded, add it to the load queue to change volume when capable. if ( self . _state !== 'loaded' || self . _playLock ) { self . _queue . push ( { event : 'volume' , action : function ( ) { self . volume . apply ( self , args ) ; } } ) ; return self ; } // Set the group volume. if ( typeof id === 'undefined' ) { self . _volume = vol ; } // Update one or all volumes. id = self . _getSoundIds ( id ) ; for ( var i = 0 ; i < id . length ; i ++ ) { // Get the sound. sound = self . _soundById ( id [ i ] ) ; if ( sound ) { sound . _volume = vol ; // Stop currently running fades. if ( ! args [ 2 ] ) { self . _stopFade ( id [ i ] ) ; } if ( self . _webAudio && sound . _node && ! sound . _muted ) { sound . _node . gain . setValueAtTime ( vol , Howler . ctx . currentTime ) ; } else if ( sound . _node && ! sound . _muted ) { sound . _node . volume = vol * Howler . volume ( ) ; } self . _emit ( 'volume' , sound . _id ) ; } } } else { sound = id ? self . _soundById ( id ) : self . _sounds [ 0 ] ; return sound ? sound . _volume : 0 ; } return self ; }
Get/set the volume of this sound or of the Howl group. This method can optionally take 0, 1 or 2 arguments.
volume() -> Returns the group's volume value.
volume(id) -> Returns the sound id's current volume.
volume(vol) -> Sets the volume of all sounds in this Howl group.
volume(vol, id) -> Sets the volume of passed sound id.
@return {Howl/Number} Returns self or current volume.
Get / set the volume of this sound or of the Howl group . This method can optionally take 0 1 or 2 arguments . volume () - > Returns the group s volume value . volume ( id ) - > Returns the sound id s current volume . volume ( vol ) - > Sets the volume of all sounds in this Howl group . volume ( vol id ) - > Sets the volume of passed sound id .
Update the volume of the group.