Get the volume information.
493076
async def get_volume_information(self) -> List[Volume]:
        """"""
        res = await self.services["audio"]["getVolumeInformation"]({})
        volume_info = [Volume.make(services=self.services, **x) for x in res]
        if len(volume_info) < 1:
            logging.warning("Unable to get volume information")
        elif len(volume_info) > 1:
            logging.debug("The device seems to have more than one volume setting.")
        return volume_info
572185
def get_volume():
	'''
	'''

	if system.get_name() == 'windows':
		# TODO: Implement volume for Windows. Looks like WinAPI is the
		# solution...
		pass

	elif system.get_name() == 'mac':
		volume = system.get_cmd_out(
			['osascript', '-e', 'set ovol to output volume of (get volume settings); return the quoted form of ovol'])
		return int(volume) * 10

	else:
		# Linux/Unix
		volume = system.get_cmd_out(
				('amixer get Master |grep % |awk \'{print $5}\'|'
				 'sed -e \'s/\[//\' -e \'s/\]//\' | head -n1'))
		return int(volume.replace('%', ''))
110315
def _get_key_info(self):
        """"""
        vkey_scan = LoByte(VkKeyScan(self.key))

        return (vkey_scan, MapVirtualKey(vkey_scan, 0), 0)
1044562
def _format_index(self, volume_system, idx):
        """"""

        if volume_system.parent.index is not None:
            return '{0}.{1}'.format(volume_system.parent.index, idx)
        else:
            return str(idx)
963957
def volume_info(self, vol=None, type_filter=None):
		''
		vols = yield self(join('volumes', vol))
		if not isinstance(vols, list): vols = [vols]
		if type_filter is not None:
			vols = list(vol for vol in vols if vol['type'] == type_filter)
		if vol is not None: defer.returnValue(vols[0] if vols else None)
		defer.returnValue(vols)
179174
public int getSoundVolume() throws CommandExecutionException {
        JSONArray res = sendToArray("get_sound_volume");
        if (res == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_RESPONSE);
        int vol = res.optInt(0, -1);
        if (vol < 0) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_RESPONSE);
        return vol;
    }
1230113
def volumes(self):
    """"""
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return iter(self._volumes.values())
152961
def get_volume_set(name)
      begin
        @volume_set.get_volume_set(name)
      rescue => ex
        Util.log_exception(ex, caller_locations(1, 1)[0].label)
        raise ex
      end
    end
912996
def get(self, volume_ids=None, filters=None):
        """"""
        params = {}
        if filters:
            params["filters"] = make_filters(filters)
        if isinstance(volume_ids, str):
            volume_ids = [volume_ids]
        return self.call("DescribeVolumes",
                         VolumeIds=volume_ids,
                         response_data_key="Volumes",
                         **params)
1027044
def volume(self):
        
        volume = ((np.pi * self.primitive.radius ** 2) *
                  self.primitive.height)
        return volume
278515
def calc_volume(self, sample: np.ndarray):
        """"""
        return sqrt(np.mean(np.square(sample)))
49015
def _volume(shape):
    """"""
    prod = 1
    for start, stop in shape:
        prod *= stop - start
    return prod
21350
def GetVolumeByIdentifier(self, volume_identifier):
    
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return self._volumes[volume_identifier]
533163
def get_stats(self):
        
        stats = {
            "input_file": self.media_file.input_file,
            "output_file": self.media_file.output_file,
            "stream_id": self.stream_id
        }
        stats.update(self.loudness_statistics)
        return stats
37713
def volume(self):
        

        response = self.renderingControl.GetVolume([
            ('InstanceID', 0),
            ('Channel', 'Master'),
        ])
        volume = response['CurrentVolume']
        return int(volume)
320882
async def volume(dev: Device, volume, output):
    
    vol = None
    vol_controls = await dev.get_volume_information()
    if output is not None:
        click.echo("Using output: %s" % output)
        output_uri = (await dev.get_zone(output)).uri
        for v in vol_controls:
            if v.output == output_uri:
                vol = v
                break
    else:
        vol = vol_controls[0]

    if vol is None:
        err("Unable to find volume controller: %s" % output)
        return

    if volume and volume == "mute":
        click.echo("Muting")
        await vol.set_mute(True)
    elif volume and volume == "unmute":
        click.echo("Unmuting")
        await vol.set_mute(False)
    elif volume:
        click.echo("Setting volume to %s" % volume)
        await vol.set_volume(volume)

    if output is not None:
        click.echo(vol)
    else:
        [click.echo(x) for x in vol_controls]
730247
def volumes(self):
        
        if not self.__volumes:
            self.__volumes = Volumes(self.__connection)
        return self.__volumes