如何提高Android PJSIP中的麦克风音量? [英] How to increase Microphone volume level in Android PJSIP?

查看:501
本文介绍了如何提高Android PJSIP中的麦克风音量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 PJSIP android 集成在一起.在我的应用程序中拨打电话时,扬声器工作正常,但录制麦克风的音量太.对方听不到我的声音.

I have Integrated PJSIP with android. While making call in my application, the Speaker is working perfectly but Recording microphone volume is too low. My voice is not hearable by other side.

注意:但是在某些手机上它可以正常工作.

即使我尝试使用 adjustStreamVolume(),setStreamVolume(),setMode(),adjustVolume()方法来增加音量,也不会增加音量.请给我一个解决此问题的建议,以提高Android或PJSIP中的麦克风音量.

Even i tried with adjustStreamVolume(), setStreamVolume(), setMode(),adjustVolume() methods to increase my volume level, it doesn't increase in anyway. Please give me a suggestion to solve this problem to increasing microphone Volume level in Android or from PJSIP.

预先感谢.

推荐答案

问题是当我们的应用程序通过麦克风访问时,麦克风的音量水平太低.当音量降低时,您需要检查多项内容.

Problem is Microphone volume level is too low when our application access through microphone. When you got low volume, you need to check multiple things.

其中之一是使用麦克风时的音频管理器模式.

One of them is MODE OF THE AUDIO MANAGER when microphone is used.

获取Android音频管理器的模式::

AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
long mode = am.getMode();   
Log.e(TAG,"audio mode "+mode);

Android音频管理器的设置模式::

AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.setMode(3);

您可以通过上面的代码为您的应用访问音频管理器的模式. 有
1.MODE_NORMAL
2.MODE_RINGTONE
3.MODE_IN_CALL
4.MODE_IN_COMMUNICATION

You can access the mode of audio manager through this above code for your app. There are
1.MODE_NORMAL
2.MODE_RINGTONE
3.MODE_IN_CALL
4.MODE_IN_COMMUNICATION

PS :每次更改AudioManager的模式时,请在使用麦克风后更改为MODE_NORMAL,否则一旦重新启动移动设备将无法使用.

P.S. : Whenever you change the mode of the AudioManager, please change into MODE_NORMAL after using microphone otherwise it won't work once you restart the mobile.

这篇关于如何提高Android PJSIP中的麦克风音量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆