volume

Audio output level in a form that can be converted to decibel

半腔热情 提交于 2019-12-21 05:35:07
问题 I need to find a way to get the current audio output volume while the phone is making noise on the headphones, this value will be converted to a decibel level. The android API does not appear to have any way of accessing a constant volume level other than a seemingly arbitrary volume setting level, but I dont see a way to convert that to a standard decibel level or "loudness" measurement. I have seen some ways to use the mic for this, but that wont work with headsets very well. Does anyone

How to specify an iterator in the volume path when using docker-compose to scale up service?

亡梦爱人 提交于 2019-12-20 19:45:14
问题 Background: I'm using docker-compose in order to place a tomcat service into a docker swarm cluster but I'm presently struggling with how I would approach the logging directory given that I want to scale the service up yet retain the uniqueness of the logging directory. Consider the (obviously) made up docker-compose which simply starts tomcat and mounts a logging filesystem in which to capture the logs. version: '2' services: tomcat: image: "tomcat:latest" hostname: tomcat-example command:

How to specify an iterator in the volume path when using docker-compose to scale up service?

蹲街弑〆低调 提交于 2019-12-20 19:45:01
问题 Background: I'm using docker-compose in order to place a tomcat service into a docker swarm cluster but I'm presently struggling with how I would approach the logging directory given that I want to scale the service up yet retain the uniqueness of the logging directory. Consider the (obviously) made up docker-compose which simply starts tomcat and mounts a logging filesystem in which to capture the logs. version: '2' services: tomcat: image: "tomcat:latest" hostname: tomcat-example command:

MPVolumeView in a UIAlertView?

我的未来我决定 提交于 2019-12-20 07:38:28
问题 Is it possibe to put an MPVolumeView in a UIAlertView? I have tried to put it inside of it, but it does not display. It may be the sizeToFit or initWithFrame: part? Is there a way of testing if the MPVolumeView is actually being created? Here's the code I initialize both the UIAlertView and MPVolumeView with: UIAlertView *volumeAlert = [[UIAlertView alloc] initWithTitle:@"Volume" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; MPVolumeView *volumeView = [

How can I programmatically control the Microphone and Microphone Boost settings in Win7 from C#?

橙三吉。 提交于 2019-12-20 07:28:05
问题 Windows 7 has some new audio settings which I haven't been able to control from my C# application. Specifically, within the Input (microphone) properties, there is a Levels Tab containing Microphone and Microphone Boost sliders, and a Microphone mute toggle / checkbox. I need to programatically ensure that the Microphone is not muted--but have not found the necessary APIs to either read or set the values. 回答1: I was unable to find an API that provided control over these specific volume levels

How to control file operations made to a volume in docker?

流过昼夜 提交于 2019-12-20 06:39:41
问题 The situation is that I have a user space file system which can provide a bunch of posix like interface in user space. Like this: open read write mkdir ... I want to make a volume on this file system and pass it to a docker. My question is how can I control the way docker access this volume so that it can be redirected to my posix like interface? Right now my file system can't be mounted on the host. It is a completely user space file system. I think fuse can support this, but I don't want to

Docker实现数据持久化

删除回忆录丶 提交于 2019-12-20 04:04:16
由于Docker技术的火爆,以至于现在大大小小的公司都在使用Docker。对Docker熟悉的朋友都明白DOcker容器运行是有生命周期的,如果docker容器发生故障,那么就意味着容器中的数据也将丢失。那么对于企业来说的话,数据是重要的!如何做到对docker容器中的数据持久化就是运维人员需要考虑的问题了!本篇博文将了解如何对容器中的数据进行持久化! 在了解Docker数据持久化之前,需要对Docker的存储类型有一个简单的了解,执行以下命令即可看出: [root@docker ~]# docker info //查看Docker的详细信息 Containers: 2 //一共有几个容器 Running: 2 //正在运行的有几个容器 Paused: 0 //挂起、暂停的有几个容器 Stopped: 0 //停止的有几个容器 Images: 2 //有几个镜像 Server Version: 18.09.0 //docker的版本信息 Storage Driver: overlay2 //存储驱动类型为overlay2 Backing Filesystem: xfs //支持的文件系统:xfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver:

Mounting a single file from a Docker data volume in a Docker

吃可爱长大的小学妹 提交于 2019-12-19 19:42:07
问题 I'm trying to mount a single file from a Docker volume in a container when using "docker run". I've been able to mount an entire volume as a directory, e.g: docker run -v my_volume:/root/volume my_container I've also mounted single files from the physical machine, e.g: docker run -v /usr/local/bin/docker:/usr/local/bin/docker Is there a way? 回答1: Is there a way always destination path/file doesn't exist in the container , if you've created a named volume and a bind to its directory (similar

Controlling volume in a java application

纵饮孤独 提交于 2019-12-19 19:12:53
问题 I am fairly new at java. I need to control volume (volume up/down, mute) in a java application. I couldn't find a way to do this. I am developing on a linux system (for information). I tired this code: Java Code: Port lineIn; FloatControl volCtrl; try { mixer = AudioSystem.getMixer(null); lineIn = (Port)mixer.getLine(Port.Info.LINE_IN); lineIn.open(); volCtrl = (FloatControl) lineIn.getControl( FloatControl.Type.VOLUME); // Assuming getControl call succeeds, // we now have our LINE_IN VOLUME

AVPlayer Volume Control

独自空忆成欢 提交于 2019-12-19 18:50:23
问题 I want to create a button that mutes the audio from an AVPlayer. Why can´t I use .volume with AVPlayer, only with AVAudioPlayer? Is there another way to change the volume? e.g music.volume = 0.0; Thanks for your answers. 回答1: Starting in iOS 7, simply call: myAvPlayer.volume = 0; Otherwise, you'll have to use the annoying setAudioMix solution. I'm detecting support for this in my app as follows: if ([mPlayer respondsToSelector:@selector(setVolume:)]) { mPlayer.volume = 0.0; } else { NSArray