volume

How can I implement a volume meter for a song currently playing? (iPhone OS 3.1.3)

倾然丶 夕夏残阳落幕 提交于 2019-12-13 02:34:35
问题 I'm very new to core audio and I just would like some help in coding up a little volume meter for whatever's being outputted through headphones or built-in speaker, like a dB meter. I have the following code, and have been trying to go through the apple source project "SpeakHere", but it's a nightmare trying to go through all that, without knowing how it works first... Could anyone shed some light? Here's the code I have so far... (void)displayWaveForm { while (musicIsPlaying == YES { NSLog(@

Using WMP control, volume changes main app volume

会有一股神秘感。 提交于 2019-12-13 02:25:48
问题 Using the following WMP control code, public static WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer(); ... And volume controls, private void button4_Click(object sender, RoutedEventArgs e) { if (player.settings.volume > 0) { player.settings.volume--; } TextBox3.Text = "Music Volume: " + player.settings.volume.ToString(); } It's basically a kind of computer karaoke, where the computer uses text to speech to 'sing' the lyrics, and wmp to play the instrumental. Unfortunately, I

Windows Phone How to listen to volume/muisc control events

限于喜欢 提交于 2019-12-12 22:49:42
问题 Is it possible to listen to system's volume and music control events (Next/Prev)? I am playing a song from MediaLibrary using MediaPlayer but how to capture Next\Prev button press event? Thanks! 回答1: Volume Events It's not possible to listen for (or subscribe to) the system volume events. You cannot find out the current system volume or know when the volume keys on the phone are pressed. If your app is playing music using a MediaElement , for example, you simply play the sounds or music

Audio Sound Too Low in Android App

空扰寡人 提交于 2019-12-12 19:33:33
问题 I recorded some audio files to use in my app, around 50, so I would like to not record all of them again. I recently used SoundPool to play the audio files on a real device instead of the emulator and you can barely hear them. On the emulator with my PC volume set to max and device to max, I can hear it fine. Should I try to record the files louder or is there another option? 回答1: I've found that when targeting mobile devices (and cheap/small laptop speakers for that matter), it is best to do

Programmatically adjust the volume on my Windows 7 computer

坚强是说给别人听的谎言 提交于 2019-12-12 18:04:02
问题 I was wondering if it was possible to make a Tkinter scale correspond with the volume of the computer. In other words, by dragging the scale up, could the volume of the computer increase? Here is just some random code I drew up. I am running a a 64-Bit Windows 7 operating system. 1 from Tkinter import * 2 3 def sel(): 4 selection = "Value = " + str(var.get()) 5 label.config(text = selection) 6 7 root = Tk() 8 var = DoubleVar() 9 scale = Scale( root, variable = var ) 10 scale.pack(anchor

Android Mediaplayer adjust volume

纵然是瞬间 提交于 2019-12-12 17:16:33
问题 Anyone know how can I increase/decrease the volume of the sound from mediaplayer by clicking on the volume button at the side of the phone? And how can I mute the sound if the phone was set to silent mode? Code I'm using: mp = MediaPlayer.create(this, R.raw.sound); mp.start(); 回答1: I think this is what you might be interested in: 1, increase/decrease the volume of the sound: Link Here Basically Override the onKeyDown and then call mp.setVolumn(float leftVolume,float rightVolume); 2, mute the

HTML5 video tag volume control missing

落爺英雄遲暮 提交于 2019-12-12 13:18:23
问题 The volume control in HTML5 videos on my website is not appearing, see screenshot: The video plays when started, but without any sound. The videos also play fine (with sound) in VLC and Windows Media Player. I have tested in Chrome (65.0.3325.162), Firefox (59.0.1), and Android (on a Samsung tablet). The volume of my system is fine with other applications, and YouTube videos. Here is the (minimal) code (adding additional attributes like height and poster etc. makes no difference to the

Adjust Dash stream volume with Android Exoplayer

放肆的年华 提交于 2019-12-12 12:27:45
问题 I'm trying to set up a seekbar to control the level of an instance of exoplayer streaming dash. The setup I am using is a modified version of the demo project and am having trouble figuring out which element I should be trying to affect with the seekbars output ie how to use MSG_SET_VOLUME properly etc etc Any input would be massively appreciated. The end result I am looking for is an application with two instances of exoplayer both streaming dash content with a fader(seekbar) controlling the

How to adjust speaker volume from Java program?

放肆的年华 提交于 2019-12-12 09:19:02
问题 I'm running Win Vista, at the lower right side of the window there is a speaker icon next to the clock, I can click on it and adjust the volume, I wonder if there is a way in my Java program to do this automatically? For instance, when my Java program starts, it turns the volume to 80, and when the program exits, it changes the volume back to the original level. I don't mind using Runtime.getRuntime().exec() if there is a way to achieve this effect. 回答1: One of the main premises of Java is

Visualizing volume of PCM samples

廉价感情. 提交于 2019-12-12 09:13:31
问题 I have several chunks of PCM audio (G.711) in my C++ application. I would like to visualize the different audio volume in each of these chunks. My first attempt was to calculate the average of the sample values for each chunk and use that as an a volume indicator, but this doesn't work well. I do get 0 for chunks with silence and differing values for chunks with audio, but the values only differ slighly and don't seem to resemble the actual volume. What would be a better algorithem calculate