Sets the music volume (0-100)
335069
def set_volume(self, mute=False, volume=50):
        """"""
        self.publish(
            action='set',
            resource='cameras/{}'.format(self.device_id),
            publish_response=False,
            properties={'speaker': {'mute': mute, 'volume': volume}}
        )
878503
public void setAmbient(float ambient[]){
        for(int i = 0; i<ambient.length;i++)
            this.ambient[i]=ambient[i];
        Am = true;
    }
634285
function() {
          self._playLock = false;
          setParams();
          self._refreshBuffer(sound);

          // Setup the playback params.
          var vol = (sound._muted || self._muted) ? 0 : sound._volume;
          node.gain.setValueAtTime(vol, Howler.ctx.currentTime);
          sound._playStart = Howler.ctx.currentTime;

          // Play the sound using the supported method.
          if (typeof node.bufferSource.start === 'undefined') {
            sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
          } else {
            sound._loop ? node.bufferSource.start(0, seek, 86400) : node.bufferSource.start(0, seek, duration);
          }

          // Start a new timer if none is present.
          if (timeout !== Infinity) {
            self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
          }

          if (!internal) {
            setTimeout(function() {
              self._emit('play', sound._id);
              self._loadQueue();
            }, 0);
          }
        }
1067718
def set_instrument(self, channel, instr, bank=0):
        """"""
        self.instr_event(channel, instr, bank)
        self.notify_listeners(self.MSG_INSTR, {'channel': int(channel),
            'instr': int(instr), 'bank': int(bank)})
875855
def set_itunes_block(self):
        """"""
        try:
            block = self.soup.find('itunes:block').string.lower()
        except AttributeError:
            block = ""
        if block == "yes":
            self.itunes_block = True
        else:
            self.itunes_block = False
1217681
public T setAudioPreset(String preset) {
    this.audio_enabled = true;
    this.audio_preset = checkNotEmpty(preset, "audio preset must not be empty");
    return getThis();
  }
1359160
public void setAmbient(float gray){
        ambient[0]=gray;
        ambient[1]=gray;
        ambient[2]=gray;
        Am = true;
    }
315508
private void setupAudio() {
		audio.setAutoplay(cbAutoPlay.isSelected());
		audio.setLoop(!cbLoop.isDisabled() && cbLoop.isSelected());
		audio.setControls(cbControls.isSelected() ? WAudio.Controls.PLAY_PAUSE : WAudio.Controls.NATIVE);
		audio.setDisabled(cbControls.isSelected() && cbDisable.isSelected());
	}
178403
def play_empty(self):
        """"""
        if self.vclient:
            if self.streamer:
                self.streamer.volume = 0
            self.vclient.play_audio("\n".encode(), encode=False)
152443
def set_volume(self, volume):
        
        if volume < -80 or volume > 18:
            raise ValueError("Invalid volume")

        try:
            return bool(self.send_get_command(
                self._urls.command_set_volume % volume))
        except requests.exceptions.RequestException:
            _LOGGER.error("Connection error: set volume command not sent.")
            return False
1025366
function() {
  var height = window.innerHeight * 0.3;
  var width = window.innerWidth;
  wave.height = height;
  wave.height_2 = height / 2;
  wave.MAX = wave.height_2 - 4;
  wave.width = width;
  wave.width_2 = width / 2;
  wave.width_4 = width / 4;
  wave.canvas.height = height;
  wave.canvas.width = width;
  wave.container.style.margin = -(height / 2) + 'px auto';

  // Update the position of the slider.
  var sound = player.playlist[player.index].howl;
  if (sound) {
    var vol = sound.volume();
    var barWidth = (vol * 0.9);
    sliderBtn.style.left = (window.innerWidth * barWidth + window.innerWidth * 0.05 - 25) + 'px';
  }
}
1065916
def set_shuffle_on(self):
        """"""
        self.publish(
            action='set',
            resource='audioPlayback/config',
            publish_response=False,
            properties={'config': {'shuffleActive': True}}
        )
148442
public void setVolume(float volume)
    {
        // Save this in case this audio source is not being played yet
        mVolume = volume;
        if (isPlaying() && (getSourceId() != GvrAudioEngine.INVALID_ID))
        {
            // This will actually work only if the sound file is being played
            mAudioListener.getAudioEngine().setSoundVolume(getSourceId(), getVolume());
        }
    }
1096476
def set_volume(self, volume=50):
        
        assert(volume in range(101))

        log.debug("setting volume...")

        cmd, url = DEVICE_URLS["set_volume"]
        json_data = {
            "volume": volume,
        }
        return self._exec(cmd, url, json_data=json_data)
578340
function() {
      var self = this;
      var limit = self._pool;
      var cnt = 0;
      var i = 0;

      // If there are less sounds than the max pool size, we are done.
      if (self._sounds.length < limit) {
        return;
      }

      // Count the number of inactive sounds.
      for (i=0; i<self._sounds.length; i++) {
        if (self._sounds[i]._ended) {
          cnt++;
        }
      }

      // Remove excess inactive sounds, going in reverse order.
      for (i=self._sounds.length - 1; i>=0; i--) {
        if (cnt <= limit) {
          return;
        }

        if (self._sounds[i]._ended) {
          // Disconnect the audio source when using Web Audio.
          if (self._webAudio && self._sounds[i]._node) {
            self._sounds[i]._node.disconnect(0);
          }

          // Remove sounds until we have the pool size.
          self._sounds.splice(i, 1);
          cnt--;
        }
      }
    }
1119161
async def set_sound_settings(self, target: str, value: str):
        """"""
        params = {"settings": [{"target": target, "value": value}]}
        return await self.services["audio"]["setSoundSettings"](params)
349255
def set_shuffle_off(self):
        """"""
        self.publish(
            action='set',
            resource='audioPlayback/config',
            publish_response=False,
            properties={'config': {'shuffleActive': False}}
        )