volume

IOS maximum volume level for AVAudioPlayer?

谁说胖子不能爱 提交于 2019-11-30 13:53:05
I use the AVAudioPlayer to play a .caf file. My problem is: it is not loud enough for my purpose. Since the ringer sound of the IPhone is much louder I was wondering how I can archive this volume. I already tried to manipulate the .caf file but with no real success. Any ideas? The code I use so far: AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: url error: nil]; self.appSoundPlayer = newPlayer; [newPlayer release]; [appSoundPlayer prepareToPlay]; [appSoundPlayer setVolume: 0.8]; [appSoundPlayer setDelegate: self]; [appSoundPlayer play]; Edit: [appSoundPlayer setVolume

iPhone: How to play local notification sound loud independent of volume setting?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 13:49:08
The FoneHome iPhone app has a feature where you can play a sound as part of a local notification. That sound is loud regardless of what the iPhone's volume level is set at. How is it possible to get a local notification (or push) to play an audio alert that is loud independent of what the current iPhone volume level is? I tried just setting the soundName to a WAV file but it plays at whatever the current volume is, and I see no options to set it otherwise. Try using the following code NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/audiofile.mp3", [[NSBundle mainBundle]

iPhone SDK - How to disable the volume indicator view if the hardware buttons are pressed?

五迷三道 提交于 2019-11-30 07:32:33
Is there a way to prevent the volume indicator view form showing if you press the volume up/down hardware buttons? It's needed for a demo app only. So the method don't need to be App Store safe. IIRC, the presence of a MPVolumeView inhibits the display of the volume indicator overlay. Try sticking it the relevant view and seeing if this is the case. Then you can try various tricks to make it effectively invisible: Make it hidden (or make a superview hidden). Set its alpha (or the alpha of a superview) to 0, or 0.01, or so. Move it off-screen Move it almost off-screen (e.g. so only the top-left

Change the volume of a wav file in python

倖福魔咒の 提交于 2019-11-30 07:03:17
I have a 2 seconds 16bit single channel 8khz wav file and I need to change its volume. It should be quite straightforward, because changing the volume is the same as changing the amplitude of the signal, and I just need to attenuate it, that is to multiply it for a number between 0 and 1. But it doesn't work: the new sound is lower but VERY full of noise. What am I doing wrong? Here is my code: import wave, numpy, struct # Open w = wave.open("input.wav","rb") p = w.getparams() f = p[3] # number of frames s = w.readframes(f) w.close() # Edit s = numpy.fromstring(s, numpy.int16) * 5 / 10 # half

Where is kube-apiserver located

风格不统一 提交于 2019-11-30 06:51:12
Base question: When I try to use kube-apiserver on my master node, I get command not found error. How I can install/configure kube-apiserver? Any link to example will help. $ kube-apiserver --enable-admission-plugins DefaultStorageClass -bash: kube-apiserver: command not found Details: I am new to Kubernetes and Docker and was trying to create StatefulSet with volumeClaimTemplates. My problem is that the automatic PVs are not created and I get this message in the PVC log: "persistentvolume-controller waiting for a volume to be created". I am not sure if I need to define DefaultStorageClass and

第7次作业--访问权限、对象使用

徘徊边缘 提交于 2019-11-30 06:19:52
题目1: 在作业5的基础上,再创建一个柱体类,包含矩形对象、高和体积等三个成员变量,一个构造方法进行成员变量初始化,和计算体积、换底两个功能方法,在主类中输入长、宽、高,计算柱体体积,输入新的长、宽、高,创建新的矩形对象,并利用换底方法换底,再次计算柱体体积。 代码: volume.java: package factorial; public class volume { public double high; public double getHigh() { return high; } public void setHigh(double high) { this.high = high; } public double getVolume(double high,double area) { double volume; volume = high * area; return volume; } } Area.java: package factorial; public class Area { public double length; public double width; public double getLength() { //访问器 return length; } public double getWidth() { return width; }

第7次作业--访问权限、对象使用

半世苍凉 提交于 2019-11-30 06:17:05
题目1: 在作业5的基础上,再创建一个柱体类,包含矩形对象、高和体积等三个成员变量,一个构造方法进行成员变量初始化,和计算体积、换底两个功能方法,在主类中输入长、宽、高,计算柱体体积,输入新的长、宽、高,创建新的矩形对象,并利用换底方法换底,再次计算柱体体积。 Rectangle.java 1.Rectangle类 2.创建成员变量 3.设置成员变量的访问器和修改器 4.定义求矩形面积的方法getArea 1 package ccc; 2 3 public class Rectangle { 4 int length; //创建成员变量length和width表示矩形的长和宽 5 int width; 6 public int getLength() { //成员变量length和width的访问器和修改器 7 return length; 8 } 9 public void setLength(int length) { 10 this.length = length; 11 } 12 public int getWidth() { 13 return width; 14 } 15 public void setWidth(int width) { 16 this.width = width; 17 } 18 public int getArea(int length,int

GlusterFS For Ubuntu

江枫思渺然 提交于 2019-11-30 06:01:04
GlusterFS For Ubuntu BASE安装 deb://ppa.launchpad.net/gluster/glusterfs-3.5/ubuntu precise main deb-src http://ppa.launchpad.net/gluster/glusterfs-3.5/ubuntu precise main Server# apt-get install glusterfs-server Client# apt-get install glusterfs-client 有多种对Gluster配置的方式,此处介绍三种. 在一台服务器上建立Distributed Volume 假设服务器为:192.168.113.173(Server) 假设客户端为:192.168.113.179(Client) 服务端配置 Server# service glusterfs-server start 创建volume Server# gluster volume create volume-name 192.168.113.173:/home/single1 启动volume Server# gluster volume start single-volume 查看当前所有volume状态 Server# gluster volume info 若要使用Cache,则使用

How to adjust microphone volume in android?

╄→гoц情女王★ 提交于 2019-11-30 05:39:31
问题 I want to recorder the sound, but the mic (microphone) input sound is too loud, and I want to adjust the mic volume, would someone help me? The following is the main code: private int audioSource = MediaRecorder.AudioSource.MIC; private static int sampleRateInHz = 8000; private static int channelConfig = AudioFormat.CHANNEL_CONFIGURATION_MONO; private static int audioFormat = AudioFormat.ENCODING_PCM_16BIT; audioRecord = new AudioRecord(audioSource, sampleRateInHz,channelConfig, audioFormat,

滑动图片自适应image组件中aspectFill

最后都变了- 提交于 2019-11-30 05:36:49
<!--html--> <view class="videoBox"> <view class="videoBox-text"> <image src="https://xcx.hy720.com/wtt/videobtn.png"></image> <text>美食视频</text> <view>更多 ></view> </view> <scroll-view class="image-group" scroll-x="true"> <view class="dingwei"> <image src="https://xcx.hyw.cc/mp/attachment/images/7/2019/08/pCFfAPqi5ii9H9EFe8fEHFHIFEia2c.jpg" class="aa" mode='aspectFill'></image> <!--mode='aspectFill' 控制图片适应框的宽度,不完全显示,只截取图片最中间显示--> <view class="volume"> <image src="https://xcx.hy720.com/wtt/wzbtn.png" class="tubiao"></image> <text>6.8k</text> </view> <text class="dingwei-title">最走心的同学</text> <