有没有办法改变来自android的音频输出左/右声道的音量?

时间:2015-11-09 05:13:39

标签: android audio

我知道AudioManager类允许您使用setStreamVolume函数更改来自设备的流量:

AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE); 
am.setStreamVolume(AudioManager.STREAM_MUSIC, progress , 0);

问题在于它会改变来自左/右声道的音量。

是否还有其他库或方法可以分别改变来自左/右耳的音量?

1 个答案:

答案 0 :(得分:0)

Using AudioManager you can control the volume of media player. 
AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 20, 0);
also from MediaPlayer (But I didn't try that)

public void  setVolume  (float leftVolume, float rightVolume)

Parameters

leftVolume left volume scalar

rightVolume right volume scalar