Set the volume of the music as a factor of the global volume setting

@param volume The volume to play music at. 0 - 1, 1 is Max
168773
public void setVolume(float volume) {
		// Bounds check
		if(volume > 1) {
			volume = 1;
		} else if(volume < 0) {
			volume = 0;
		}
		
		this.volume = volume;
		// This sound is being played as music
		if (currentMusic == this) {
			SoundStore.get().setCurrentMusicVolume(volume);
		}
	}
44144
async def volume(self, ctx, volume: int):
        """"""

        if ctx.voice_client is None:
            return await ctx.send("Not connected to a voice channel.")

        ctx.voice_client.source.volume = volume / 100
        await ctx.send("Changed volume to {}%".format(volume))
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());
        }
    }
208094
public void setContentHeight(int height)
    {
        int h = height;
        if (max_size.height != -1 && h > max_size.height)
            h = max_size.height;
        if (min_size.height != -1 && h < min_size.height)
            h = min_size.height;
        content.height = h;
    }
1271994
public static void setContnent(String content) {
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        try {
            StringSelection selection = new StringSelection( content );
            clipboard.setContents(selection, selection);
        } catch (Exception ex) {
            //noop
        }
    }
1286640
private static void updateVolume(DataLine dataLine, int volume)
    {
        if (dataLine.isControlSupported(Type.MASTER_GAIN))
        {
            final FloatControl gainControl = (FloatControl) dataLine.getControl(Type.MASTER_GAIN);
            final double gain = UtilMath.clamp(volume / 100.0, 0.0, 100.0);
            final double dB = Math.log(gain) / Math.log(10.0) * 20.0;
            gainControl.setValue((float) dB);
        }
    }
717375
function onVolumeKeydown(event) {
		const { keyCode, shiftKey } = event;

		// 37: LEFT, 38: UP, 39: RIGHT, 40: DOWN
		if (37 <= keyCode && 40 >= keyCode) {
			event.preventDefault();

			const isLTR = /^(btt|ltr)$/.test(volumeDir);
			const offset = 37 === keyCode || 39 === keyCode ? keyCode - 38 : isLTR ? 39 - keyCode : keyCode - 39;

			media.volume = Math.max(0, Math.min(1, media.volume + offset * (isLTR ? 0.1 : -0.1) * (shiftKey ? 1 : 0.2)));
		}
	}
778353
public void setMusicPitch(float pitch) {
		if (soundWorks) {
			AL10.alSourcef(sources.get(0), AL10.AL_PITCH, pitch);
		}
	}
572190
def _volume_percentage(self, volume):
        
        if volume < 0:
            raise RuntimeError(
                "Volume must be a positive number, got {}.".format(volume))
        if volume > self.max_volume:
            raise RuntimeError(
                "{0}µl exceeds pipette's maximum volume ({1}ul).".format(
                    volume, self.max_volume))
        if volume < self.min_volume:
            self.robot.add_warning(
                "{0}µl is less than pipette's min_volume ({1}ul).".format(
                    volume, self.min_volume))

        return volume / self.max_volume
830598
public SetVolumeForUsersPlaybackRequest.Builder setVolumeForUsersPlayback(int volume_percent) {
    return new SetVolumeForUsersPlaybackRequest.Builder(accessToken)
            .setDefaults(httpManager, scheme, host, port)
            .volume_percent(volume_percent);
  }
1012876
async def volume(gc: GroupControl, volume):
    """"""
    click.echo("Setting volume to %s" % volume)
    click.echo(await gc.set_group_volume(volume))
1359160
public void setAmbient(float gray){
        ambient[0]=gray;
        ambient[1]=gray;
        ambient[2]=gray;
        Am = true;
    }
290254
function(mute) {
            if (!Crafty.support.audio) return;
            var c;
            for (var i in this.channels) {
                c = this.channels[i];
                c.obj.volume = mute ? 0 : c.volume;
            }
            this.muted = mute;
        }
710554
public void setMax (BigDecimal max) {
		if (min.compareTo(max) > 0) throw new IllegalArgumentException("min can't be > max");

		this.max = max;

		if (current.compareTo(max) > 0) {
			current = max.setScale(scale, BigDecimal.ROUND_HALF_UP);
			spinner.notifyValueChanged(spinner.isProgrammaticChangeEvents());
		}
	}
929550
public Movie setVolume(final double volume)
    {
        getAttributes().setVolume(volume);

        if (null != m_video)
        {
            m_video.setVolume(getVolume());
        }
        return this;
    }
855396
public void setMax(int max)
    {
        this.max = max;
        if (this.max < Alterable.MIN)
        {
            this.max = Alterable.MIN;
        }
        set(cur);
    }
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);
          }
        }