system-sounds

How can I mute incoming iPhone text messages programmatically?

∥☆過路亽.° 提交于 2019-12-23 08:55:10
问题 I'm currently trying to use the AVSystemController private framework to mute system noises based on the user's selection. I'm currently muting phone calls by calling: [(AVSystemController object) setVolumeTo:0.0 forCategory:@"Ringtone"]; Is there a command to do that for incoming text messages? I imagine it would be based on a change in the category identified in that call. However, I can't find a list of categories to reference. Of the 10 I've been able to find (Alert, Audio/Video, Ringtone,

iOS System Volume Control

随声附和 提交于 2019-12-23 01:43:24
问题 AudioServicesPlaySystemSound() is playing my sounds using ringer volume. I want them to play according to system volume instead. How to? 回答1: You should use the AVFoundation Framework to play your sounds. Look into the AVAudioPlayer class. 来源: https://stackoverflow.com/questions/4328700/ios-system-volume-control

Getting the system audio levels in Java

前提是你 提交于 2019-12-19 09:18:10
问题 How does one get the master volume in Java? I want to make a program that displays ( NOT CHANGE ) this value (probably on a JProgressBar or something similar) as a percentage of the maximum setting. I might also want to display the current sound level as a percentage of highest possible sound level, but this is not needed. 回答1: I am not entirely sure, but you could have a look at the (Java Media Framework - JMF). You are able to control the sound via that library, so I would assume you can

System Sounds in Java

你。 提交于 2019-12-13 12:55:50
问题 I'm trying to code an error dialog, and I want it to call the proper system-specified sound. Is there any way to access system sounds from Java (i.e. Startup sound, default beep, asterisk, critical stop, etc.)? Note: I know about java.awt.Toolkit.getDefaultToolkit().beep(); 回答1: Here ya go (exclusively for windows:) final Runnable runnable = (Runnable) Toolkit.getDefaultToolkit().getDesktopProperty("win.sound.exclamation"); if (runnable != null) runnable.run(); More sounds for Windows (all

Selecting sounds from Windows and playing them

感情迁移 提交于 2019-12-06 18:45:14
问题 I have a WinForms app. This app has a Preferences section where the user will be able to select which sounds are played when an alert is being displayed. Is it possible to have a combobox where the user can select from the Windows stored sounds such as "critical stop", "critical beep" and so on. These are found in the "Control Panel" >> "Sounds and Alerts" section. Is it also possible to have a play button to test the sounds out? 回答1: Try this: private void Form1_Load(object sender, EventArgs

Android NFC: enable and disable the NFC detected sounds

冷暖自知 提交于 2019-12-05 05:29:33
I am dealing with NFC tags. My problem is that I cannot turn off the sound when NFC tags are detected. I started my research and also started getting confused: Turn off device's NFC sound Prevent alert tone when scanning / identifying an NFC intent How do I disable/change the NFC sounds? Some say that we can and some that we can't disable those sounds. Can we disable and enable the NFC sound programmatically? Starting with API level 19 (Android 4.4) you can disable the NFC sounds while your app is in the foreground by using the newer reader-mode API to listen for NFC tags. The reader-mode API

Selecting sounds from Windows and playing them

三世轮回 提交于 2019-12-05 01:36:33
I have a WinForms app. This app has a Preferences section where the user will be able to select which sounds are played when an alert is being displayed. Is it possible to have a combobox where the user can select from the Windows stored sounds such as "critical stop", "critical beep" and so on. These are found in the "Control Panel" >> "Sounds and Alerts" section. Is it also possible to have a play button to test the sounds out? Try this: private void Form1_Load(object sender, EventArgs e) { var systemSounds = new[] { System.Media.SystemSounds.Asterisk, System.Media.SystemSounds.Beep, System

sound picker / list of system sounds [duplicate]

风流意气都作罢 提交于 2019-11-29 08:18:45
This question already has an answer here: Playing system sound without importing your own 9 answers Okay. I was looking for a neat way to list system sounds that are played with [NSSound soundNamed: ] - and to me it seemed that API does not have list of available sounds. I also searched this with google and found some pretty old and partially already deprecated sources. If application should have a soundpicker - what would be a best way to get list of system provided sounds? This is my implementation. NSSound (systemSounds.h): #import <AppKit/AppKit.h> @interface NSSound (systemSounds) +

Sound picker / List of system sounds on macOS [duplicate]

独自空忆成欢 提交于 2019-11-28 01:23:55
问题 This question already has answers here : Playing system sound without importing your own (9 answers) Closed 6 years ago . Okay. I was looking for a neat way to list system sounds that are played with [NSSound soundNamed: ] - and to me it seemed that API does not have list of available sounds. I also searched this with google and found some pretty old and partially already deprecated sources. If application should have a soundpicker - what would be a best way to get list of system provided

Stop the 'Ding' when pressing Enter

帅比萌擦擦* 提交于 2019-11-26 17:38:57
I have a very simple Windows Forms Application. And, in Windows (or, atleast Windows Forms Applications), when you press Enter while inside a Single-line TextBox Control, you hear a Ding. It's an unpleasent sound, that indicated you cannot enter a newline, because it is a single-line TextBox. This is all fine. However, in my Form, I have 1 TextBox, and a Search Button. And I am allowing the user to Perform a search by pressing Enter after they've finished typing, so they don't have to use the mouse to click the Search Button. But this Ding sound occurs. It's very annoying. How can we make it