volume

get ringer volume level using AVSystemController in ios

走远了吗. 提交于 2019-12-23 12:46:48
问题 How can i get iphone's current ringer volume level using AVSystemController I also tried below code to check volume level MPVolumeView *slide = [MPVolumeView new]; UISlider *volumeViewSlider; for (UIView *view in [slide subviews]){ if ([[[view class] description] isEqualToString:@"MPVolumeSlider"]) { volumeViewSlider = (UISlider *) view; } } float val = [volumeViewSlider value]; But when i print / check val, it returns 1.00 I also tried below code musicPlayer = [MPMusicPlayerController

Sound of App running on iPhone too low

此生再无相见时 提交于 2019-12-23 12:26:00
问题 I've written an App supposed to BE run both on iPad and on iPhone. I'm using AVAudioPlayer for playing back sound. Now I've run into some problems with the volume levels. When running on the iPad, everything is fine, the volume level of the sound being played is fine, also when running in the iPad simulator. The problem arises when the app is being run on the iPhone: whereas the volume levels in the iPhone simulator are fine, the levels on the device are very low. Here's the code I'm using on

Android Studio Mute/Unmute Phone

匆匆过客 提交于 2019-12-23 04:29:40
问题 So this link helps a lot: Android mute/unmute phone But I am a not the best at interpreting other people's code and everytime I try to put in there code my program crashes. Could someone help me with how to I can fix it? Spent about an hour trying to figure it out. 回答1: All you have to do is in your AndroidManifest.xml add the permission for vibration. <uses-permission android:name="android.permission.VIBRATE" /> After that in your activity whenever you want to change it to vibrate use this

Disable Place Order button conditionally in Woocommerce

我是研究僧i 提交于 2019-12-22 17:58:22
问题 I have some code in a function that displays a message to the end user when the total added value of a custom field exceeds a certain value. Basically its a message telling the customer that they have ordered too much furniture to fit into a 68m3 container. I also have code which is suppose to disable the add to cart button on products - this doesn't seem to work. So is there a visible issue in the code below to disable the add to cart button when my custom field total value exceeds 68 and is

Programmatically retrieve an OS X disk partition UUID

耗尽温柔 提交于 2019-12-22 08:05:22
问题 I have a path to a partition. How can I retrieve UUID of that partition programatically without using terminal commands? An example will be more helpful. 回答1: You can use the Disk Arbitration framework (Apple reference). There is also a good summary at this blog by Chris Suter. You can get the UUID by using the kDADiskDescriptionMediaUUIDKey. Aaron Burghardt described it well in this mailing list thread. Here is a quote from that link: Once you have the DADisk, use DADiskCopyDescription to

Increase/Decrease audio volume using FFmpeg

倾然丶 夕夏残阳落幕 提交于 2019-12-22 06:15:10
问题 I'm am currently using C# invokes to call the FFmpeg APIs to handle video and audio. I have the following code in place to extract the audio from a video and write it to a file. while (ffmpeg.av_read_frame(formatContext, &packet) >= 0) { if (packet.stream_index == streamIndex) { while (packet.size > 0) { int frameDecoded; int frameDecodedResult = ffmpeg.avcodec_decode_audio4(codecContext, frame, &frameDecoded, packet); if (frameDecoded > 0 && frameDecodedResult >= 0) { //writeAudio.WriteFrame

Disable the Volume Toast

北慕城南 提交于 2019-12-22 05:25:44
问题 I'm trying to increase the volume using AudioManager. But it showing Native Android Volume UI(Volume Seekbar) toast.I want to disable this. I know this can be possible in Activity using Key Event but i want to do it through service. How to disable the toast? Here is a screenshot of the toast: 回答1: The AudioManager -class offers the following methods to adjust the volume of certain streams: adjustVolume(int, int) adjustStreamVolume(int, int, int) adjustSuggestedStreamVolume(int, int, int)

How to set a specific starting volume for <audio> tag

余生颓废 提交于 2019-12-22 04:42:37
问题 I only have basic knowledge of HTML and CSS and have looked through Google extensively trying to find an answer to this question -- it all seems to point to JavaScript and/or jQuery. I tried it, and I can't get it to work. I have an audio file that starts to play when my website loads. I want to set a specific starting volume so that my visitors don't get a heart attack if their volume is high. This is what I have: HTML: <audio id="bgAudio" autoplay="autoplay" controls="controls" loop="loop"

Change system volume in Windows Phone 8

╄→гoц情女王★ 提交于 2019-12-21 17:19:00
问题 Up until now I thought that changing the system volume from your app is impossible, until recently a new app called Quite Hours (http://www.windowsphone.com/en-us/store/app/quiet-hours/f347a36b-80c0-430f-8631-e55046ee5a2a) actually did just that in a very neat way. Does anyone please know how to do that programmatically? I tried using the MediaElement or the xna MediaPlayer and the backgroundAudioPlayer and nothing worked. Any help would be appreciated! Thank you! 回答1: The developers of the

linux学习笔记—之—LVM管理

こ雲淡風輕ζ 提交于 2019-12-21 09:08:25
1. 认识 LVM   LVM 是逻辑盘卷管理( Logical Volume Manager )的简称,它是 Linux 环境下对磁盘分区进行管理的一种机制, LVM 是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分区管理的灵活性。通过 LVM 系统管理员可以轻松管理磁盘分区,如:将若干个磁盘分区连接为一个整块的卷组( volume group ),形成一个存储池。 2.LVM 的基本术语 #物理存储介质(The physical media)   这里指系统的存储设备:硬盘,如:/dev/hda1、/dev/sda等等,是存储系统最低层的存储单元。 #物理卷(physical volume)   物理卷是指硬盘分区或从逻辑上与磁盘分区具有同样功能的设备(如RAID),是LVM的基本存储逻辑块,但和基本的物理存储介质(如分区、磁盘等)比较,却包含有与LVM相关的管理参数。 #卷组(Volume Group)   LVM卷组类似于非LVM系统中的物理硬盘,其由物理卷组成。可以在卷组上创建一个或多个“LVM分区”(逻辑卷),LVM卷组由一个或多个物理卷组成。 #逻辑卷(logical volume)   LVM的逻辑卷类似于非LVM系统中的硬盘分区,在逻辑卷之上可以建立文件系统(比如/home或者/usr等)。 #PE(physical extent)