volume

AVPlayer Volume Control

若如初见. 提交于 2019-12-19 18:49:32
问题 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

Controlling volume in C# using WMPLib in Windows

谁都会走 提交于 2019-12-19 10:51:09
问题 The story: I'm writing a music player controlled by voice. Previously the project used winamp for music -- which I'd like to do away with. I'd like to integrate the voice control with music player. The problem is, when changing the volume property of my media player object (mplayer.settings.volume = 5;), it changes the MASTER volume. Meaning any voice feedback will be completely inaudible while music is playing. Not cool when you're driving. If I fire up windows media player, I can change the

Set OS X volume in OS X 10.11 using Swift without using the deprecated AudioHardwareServiceSetPropertyData API

对着背影说爱祢 提交于 2019-12-19 10:49:07
问题 I found this code to set the system volume using Swift. While using the code in a playground I got warning. AudioHardwareServiceSetPropertyData was deprecated in OS X 10.11 How do I update the code for OS X 10.11? Thanks. :) 回答1: As also suggested in this answer to a similar Objective-C question, I'd suggest using ISSoundAdditions, which you can call from Swift as such: NSSound.setSystemVolume(0.5) The implementation of -setSystemVolume begins around line 113 in ISSoundAdditions.m in case you

navigator.getUserMedia() audio recording - howto set volume input level of microphone?

↘锁芯ラ 提交于 2019-12-19 06:56:59
问题 The navigator.getUserMedia(....) call can be used in some modern browser to record audio in Javascript. Is there a way to adjust/set the input volume level of the microphone? The setting for this is not always optimal. Sometimes the microphone is set to record only at a very very low input volume. Sure the user could adjust manually the input volume level in his system, but most of my users might lack the knowledge to do this. Therefore it would be best I could adjust the microphone volume

What do the the flag parameter means and range of possible min and max of droid device

北城余情 提交于 2019-12-19 03:14:54
问题 I want to know what is flag(or what are the possible values for flag) in audiomanager.setStreamVolume (int streamType, int index, int flags); I know we can get the maximum stream using audiomanger.getMaxStream(audioManager.getStreamMax(AudioManager.STREAM_MUSIC)); But in some device it gives 13,15, it depends on Android version or device hardware and what is it range(minimum possible value, maximum possible value) Sets the volume index for a particular stream. This method has no effect if the

GFS分布式文件系统集群(实例!!!)

坚强是说给别人听的谎言 提交于 2019-12-18 23:44:29
GFS分布式文件系统集群项目 群集环境 卷类型 卷名称 卷类型 空间大小 Brick dis-volume 分布式卷 40G node1(/b1)、node2(/b1) stripe-volume 条带卷 40G node1(/c1)、node2(/c1) rep-volume 复制卷 20G node3(/b1)、node4(/b1) dis-stripe 分布式条带卷 40G node1(/d1)、node2(/d1)、node3(/d1)、node4(/d1) dis-rep 分布式复制卷 20G node1(/e1)、node2(/e1)、node3(/e1)、node4(/e1) 实验准备 1、为四台服务器服务器每台添加4个磁盘 2、修改服务器的名称 分别修改为node1、node2、node3、node4 [root@localhost ~]#hostnamectl set-hostname node1 [root@localhost ~]# su 3、将四台服务器上的磁盘格式化,并挂载 在这里我们使用脚本执行挂载 #进入opt目录 [root@node1 ~]# cd /opt #磁盘格式化、挂载脚本 [root@node1 opt]# vim a.sh #! /bin/bash echo "the disks exist list:" fdisk -l |grep

Listen to volume changes events on Android

本秂侑毒 提交于 2019-12-18 13:12:25
问题 Is there any way to listen to the event of volume change on Android, without just taking over the volume buttons? The only thing I've found that works is here, but it works only after the volume control has disappeared. Not all devices have volume buttons, and I need to capture the volume changes as soon as they occur, and not after the volume dialog is gone. 回答1: Better, you can register a ContentObserver as follows: getApplicationContext().getContentResolver().registerContentObserver

02、Docker之数据卷(Centos7)

杀马特。学长 韩版系。学妹 提交于 2019-12-18 07:36:58
Docker之数据卷 1. Docker 数据管理 在生产环境中使用 Docker ,往往需要对数据进行持久化,或者需要在多个容器之间进行数据共享,这必然涉及容器的数据管理操作容器中的管理数据主要有两种方式: 数据卷 Data Volumes 容器内数据直接映射到本地主机环境; 数据卷容器(Data Volume Containers 使用特定容器维护数据卷 二、数据卷(Data Volumes) 数据卷是一个可供一个或多个容器使用的特殊目录,它将主机操作系统目录直接映射进容器, 它可以提供很多有用的特性: 1.数据卷 可以在容器之间共享和重用 2.对数据卷的修改会立马生效 3.对数据卷的更新,不会影响镜像 4.数据卷 默认会一直存在,即使容器被删除 1)数据卷相关操作 创建数据卷 $ docker volume create my - vol //$ 标记,运行命令时不需要 my-vol 为你的数据卷名称 此时,数据卷默认会放到/var/lib/docker/volumes路径下,会发现所新建的数据卷位置,查看命令如下: $ ls - 1 / var / lib / docker / volumes 2)查看所有的数据卷 $ docker volume ls 3)查看指定数据卷的详细信息(显示一个JSON格式的数据) $ docker volume inspect my -

How to control the MIDI channel's volume

独自空忆成欢 提交于 2019-12-18 06:54:17
问题 I have this code: Synthesizer synthesizer = MidiSystem.getSynthesizer(); synthesizer.open(); Instrument[] instrument = synthesizer.getDefaultSoundbank().getInstruments(); synthesizer.loadInstrument(instrument[29]); MidiChannel[] channels = synthesizer.getChannels(); MidiChannel channel = channels[1]; channel.programChange(29); channel.noteOn(noteNumber, 127); Teszthang.sleep(2000); channel.noteOff(noteNumber); so this is an example, to play a sound in max volume (127) for 2 seconds. but i

Swift: how to set the iphone volume programmatically [duplicate]

我只是一个虾纸丫 提交于 2019-12-18 04:12:44
问题 This question already has answers here : How to change device Volume on iOS - not music volume (8 answers) How to change an iOS device volume programmatically? (4 answers) Closed 3 years ago . I am trying to create an alarm app and I have noticed that apps like Sleep Cycle will set your volume to max right before the alarm goes off, even if you had the volume at very low. I have tried using AVAudioPlayer and all I have seen with MPVolumeView is that the user must do it. Is there any way I can