Android MediaRecorder set audio volume - android

I'm not that familiar with android programming and would like to set the audio volume while (or before) recording a video with MediaRecorder. Is there a way to do that? Or is there a better way to record a video with variable audio volume, instead of using MediaRecorder?

There is no way to set volume while recording using MediaRecorder. But you can set volume while playing using MediaPlayer by using the method setVolume(float, float)

Related

Android media playback - stop audio output completely?

I have an app that plays video files with no audio. I'm using the mediaplayer function. I want to have the videos play, but not output anything to audio, as there is no audio tracks. However, Android ducks all other audio output (music, for example) when my app is running. Is there a way to use mediaplayer and completely remove my app from audio streams?
I've reviewed Google's Managing Audio Focus article, and I can't devise a way to do so. I just want to use mediaplayer for the video, and completely forget about audio.
Is there a different function I have to call in mediaPlayer.setAudioStreamType?
you can mute all the audio streams using the below code snippet
AudioManager am = (AudioManager)NextVideoPlayer.this.getSystemService(Context.AUDIO_SERVICE);
am.setStreamMute(AudioManager.STREAM_MUSIC, true);

Tamper voice using audiorecord

I am recording my voice using AudioRecord class and I am playing it with a small delay using AudioTrack
How can I change what my voice sounds like?
You can use the SoundPool class:
https://developer.android.com/reference/android/media/SoundPool.html
for example, using the setRate (int streamID, float rate) method, you can change the rate at which sound is played back. If you increase the rate, you'll sound like a chipmunk :-)

Record with high volume in android

I am doing audio recording using MediaRecorder, but unfortunately when I playback the recorded audio, I have media with a very low volume. I don't hear anything (almost anything).
Is there any possibility to increase recording volume? Like setVolume() when we record?
I try to see in MediaRecorder API but i can't find setVolume or something like that..
Is there any work around?
Thanks.
Well after some r&d and googling i found is there is no specific volume for mic. when you are recording that takes media volume as mic volume.
So to set it, Goto
Settings->Sound->Volume->
and check Media volume.
If you wan to Record in the full Volume then keep Media Volume high and if you want to record in low Volume then keep Media Volume Small.
AIK there is no other sollution.
So please do it for your case.

API to record audio with specific volume on Android

I want to make an app to record using MediaRecorder with certain volume set by user.
Is there any possibility to set the volume when recording? I try to see in MediaRecorder API but i can't find setVolume or something like that..
Is there any work around? Or any post process that i have to do to make it happen?
Thanks.
You can not do it while recording, but you can set the volume while playing with the setVolume(float, float) method on MediaPlayer.

Android. How to Do Audio Recording with High Volume?

I will describe briefly my trouble with audio recording.
So, I am doing audio recording using MediaRecorder, but unfortunately when I playback the recorded audio, I have media with a very low volume. I hardly hear anything.
Is there any possibility to setup recording volume?
Thanks.
I experienced this issue on the Nexus One while using Froyo when the AudioManager was set to MODE_IN_CALL. Try setting it to MODE_NORMAL. This fixed the problem for me.
AudioManager audioManager = (AudioManager)activity.getSystemService(Context.AUDIO_SERVICE);
audioManager.setMode(AudioManager.MODE_NORMAL);
There is no way to do this while recording - but while playing, you can use the setVolume(float, float) method on MediaPlayer.

Categories

Resources