// Volume set the volume for the user's current playback device.
//
// Percent is must be a value from 0 to 100 inclusive.
//
// Requires the ScopeUserModifyPlaybackState in order to modify the player state
10893
func (c *Client) Volume(percent int) error {
	return c.VolumeOpt(percent, nil)
}
817824
func VolumeFromState(v state.Volume) (params.Volume, error) {
	info, err := v.Info()
	if err != nil {
		return params.Volume{}, errors.Trace(err)
	}
	return params.Volume{
		v.VolumeTag().String(),
		VolumeInfoFromState(info),
	}, nil
}
856514
func (s *statsNotSupported) Stats(
	volumeID string,
	cumulative bool,
) (*api.Stats, error) {
	return nil, ErrNotSupported
}
952313
func (c *Client) SetVolume(volume int) error {
	return c.Command("setvol %d", volume).OK()
}
1003909
func (v *volumeAttachment) Volume() names.VolumeTag {
	return names.NewVolumeTag(v.doc.Volume)
}
91736
func (d *DeviceMapperDriver) Resize(volumeName string, size uint64) error {
	vol, err := d.getVolume(volumeName, false)
	if err != nil {
		return err
	}
	if err := d.resize(vol.deviceHash(), size); err != nil {
		return err
	}
	newSize := volume.FilesystemBytesSize(vol.Path())
	human := units.BytesSize(float64(newSize))
	glog.Infof("Resized filesystem. New size: %s", human)
	return nil
}
1362700
func (d *driver) Volumes(
	ctx types.Context,
	opts *types.VolumesOpts) ([]*types.Volume, error) {

	vols, err := d.toTypeVolumes(ctx, opts.Attachments)
	if err != nil {
		return nil, goof.WithError("error getting s3fs volumes", err)
	}
	return vols, nil
}
367562
func (v *localVolume) Mount(id string) (string, error) {
	v.m.Lock()
	defer v.m.Unlock()
	if v.opts != nil {
		if !v.active.mounted {
			if err := v.mount(); err != nil {
				return "", errdefs.System(err)
			}
			v.active.mounted = true
		}
		v.active.count++
	}
	return v.path, nil
}
1151869
func EqualVolume(a, b *csi.Volume) bool {
	if a == nil || b == nil {
		return false
	}
	return CompareVolume(*a, *b) == 0
}
754677
func (a *AudioSystem) Update(dt float32) {
	if len(a.playerCh) >= 25 { //if the channel is full just return so we don't block the update loop
		return
	}
	players := make([]*Player, 0)
	for _, e := range a.entities {
		if e.Player.isPlaying {
			players = append(players, e.Player)
		}
	}
	a.playerCh <- players
}
851001
func (d *Decoder) Format() *audio.Format {
	if d == nil {
		return nil
	}
	return &audio.Format{
		NumChannels: int(d.NumChans),
		SampleRate:  int(d.SampleRate),
		BitDepth:    int(d.BitDepth),
		Endianness:  binary.BigEndian,
	}
}
1110386
func (s *Ebs) SetVolumeSize(v int64) *Ebs {
	s.VolumeSize = &v
	return s
}
838115
func (b *BigIP) Volumes() (*Volumes, error) {
	var volumes Volumes
	err, _ := b.getForEntity(&volumes, uriSys, uriSoftware, uriVolume)
	if err != nil {
		return nil, err
	}

	return &volumes, nil
}
798900
func VolumeFromString(vp string) (*Volume, error) {
	vp = "name=" + vp
	vpQuery, err := common.MakeQueryString(vp)
	if err != nil {
		return nil, err
	}

	v, err := url.ParseQuery(vpQuery)
	if err != nil {
		return nil, err
	}
	return VolumeFromParams(v)
}
1310291
func VolumeInfoFromState(info state.VolumeInfo) params.VolumeInfo {
	return params.VolumeInfo{
		info.VolumeId,
		info.HardwareId,
		info.WWN,
		info.Pool,
		info.Size,
		info.Persistent,
	}
}
1193515
func (p *Player) GetVolume() float64 {
	v := 0.0
	p.sync(func() {
		v = p.volume
	})
	return v
}
1190983
func (v *Widget) SetUSize(width int, height int) {
	deprecated_since(2, 2, 0, "gtk_widget_set_usize()")
	C.gtk_widget_set_usize(v.GWidget, gint(width), gint(height))
}