volume

How to adjust microphone volume in android?

五迷三道 提交于 2019-11-30 20:56:50
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, bufferSizeInBytes); audioManager.setSpeakerphoneOn(false); When the microphone is open, it used the

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

戏子无情 提交于 2019-11-30 20:24:25
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 device implements a fixed volume policy as indicated by isVolumeFixed().// what does it mean.

Reduce the volume of a Wav audio file using C

空扰寡人 提交于 2019-11-30 20:09:41
问题 I am writing a C program for editing a Wav audio file. I have loaded all file datas in an array of unsigned integer values (UINT16_T). Now, i would like to reduce the volume of the file. I thought it was enough to decrease the value (of a certain percentage) of the single values. But if i do that, i obtain an audio file with noise (I think I understand is called "static" or "click noise") Why? Which is the right procedure? Thank You! This is the piece of code affected: FILE* fp; FILE* fp2; /

kubernetes persistent volume accessmode

别来无恙 提交于 2019-11-30 18:20:29
It seems that Kubernetes supports 3 kinds of access mode for persistent volume: ReadWriteOnce , ReadOnlyMany , ReadWriteMany . I'm really curious about the scheduler strategy for a pod which uses the ReadWriteOnce mode volume. For example, I created an RC which have pod num=2, I guess the two pods will be scheduled into the same host because they use the volume that has ReadWriteOnce mode? I really want to know the source code of this part. DavidO If a pod mounts a volume with ReadWriteOnce access mode, no other pod can mount it. In GCE (Google Compute Engine) the only allowed modes are

Set Computer Volume

纵饮孤独 提交于 2019-11-30 18:01:12
问题 I want to make a java program that Reads a line from a file (ex.File text is : "Hello") if the Line = "Hello" then get computer volume if computer volume is > 1 then Volume=volume / 2 I don't know how do the volume part, of this program. I have looked online for the past hour and I can't seem to get an idea on how to do this, or if it is even possible. I forgot to add (I'm using windows 7) 回答1: I have written an utility class for controlling volume which is used like that: Audio

Mount docker host volume but overwrite with container's contents

纵然是瞬间 提交于 2019-11-30 17:26:01
Several articles have been extremely helpful in understanding Docker's volume and data management. These two in particular are excellent: http://container-solutions.com/understanding-volumes-docker/ http://www.alexecollins.com/docker-persistence/ However, I am not sure if what I am looking for is discussed. Here is my understanding: When running docker run -v /host/something:/container/something the host files will overlay (but not overwrite) the container files at the specified location. The container will no longer have access to the location's previous files, but instead only have access to

Mount docker host volume but overwrite with container's contents

霸气de小男生 提交于 2019-11-30 16:40:01
问题 Several articles have been extremely helpful in understanding Docker's volume and data management. These two in particular are excellent: http://container-solutions.com/understanding-volumes-docker/ http://www.alexecollins.com/docker-persistence/ However, I am not sure if what I am looking for is discussed. Here is my understanding: When running docker run -v /host/something:/container/something the host files will overlay (but not overwrite) the container files at the specified location. The

How to check if the system master volume is mute or unmute?

穿精又带淫゛_ 提交于 2019-11-30 15:37:45
问题 I'm using this code to mute/unmute system master volume: const APPCOMMAND_VOLUME_MUTE = $80000; WM_APPCOMMAND = $319; procedure TForm1.Button1Click(Sender: TObject); begin // toggle mute/unmute SendMessageW(Handle, WM_APPCOMMAND, Handle, APPCOMMAND_VOLUME_MUTE); end; (Got the code from https://stackoverflow.com/a/154128/1140885) It works fine on XP (Didn't test it on Win7 yet). I need a method to check (get) what is the current "mute" state? Is it mute or not. Any ideas? Update: For XP I

How do I calculate the volume of an object stored in STL files?

喜欢而已 提交于 2019-11-30 15:26:41
I have .stl ( STL is a file format native to the stereolithography CAD software created by 3D Systems ) files, from which I must calculate the volume. How do I do this? I'm using the calculation below but the volume is not equal to that calculated by other software float x1,y1,z1; float x2,y2,z2; float x3,y3,z3; The above are the vertices. triangles is just a data structure holding an object with the vertices of each triangle. totalVolume += currentVolume = (triangles[i].x1*triangles[i].y2*triangles[i].z3 - triangles[i].x1*triangles[i].y3*triangles[i].z2 - triangles[i].x2*triangles[i].y1

How to increase the ringer & notification volume programmatically in android

和自甴很熟 提交于 2019-11-30 14:44:17
I am trying to enable the ringer normal mode and increase the volume programmatically. AudioManager mobilemode = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); // int streamMaxVolume = mobilemode.getStreamMaxVolume(AudioManager.STREAM_RING); switch (mobilemode.getRingerMode()) { case AudioManager.RINGER_MODE_SILENT: Log.i("MyApp","Silent mode"); mobilemode.setRingerMode(AudioManager.RINGER_MODE_NORMAL); mobilemode.setStreamVolume (AudioManager.STREAM_MUSIC,mobilemode.getStreamMaxVolume(AudioManager.STREAM_MUSIC),0); break; case AudioManager.RINGER_MODE_VIBRATE: Log.i("MyApp",