我正在尝试切换 Android 手机的麦克风。应用程序。如果我在循环中运行静音和取消静音,则会冻结,延迟时间为 500 毫秒。移动设备的这种行为是否有特定原因?(摩托罗拉 Droid 甚至无法将手机静音)但是所有其他手机都可以做到。
循环运行 20 次
audioService.setMicrophoneMute(true);
if(audioService.isMicrophoneMute())
{
Toast.makeText(getBaseContext(), "MUTED", 1).show();}
try {
Thread.sleep(1000,90);
}
catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
audioService.setMicrophoneMute(false);
if(!audioService.isMicrophoneMute()){
Toast.makeText(getBaseContext(), "Un MUTED", 1).show();