在我的应用程序中,我有16个媒体播放器,我有1个媒体播放器的均衡器,但我想同时用于所有16个媒体播放器。 这是我的均衡器代码
private void setupEqualizerFxAndUI() {
mEqualizer = new Equalizer(0, mMediaPlayer.getAudioSessionId());
mEqualizer.setEnabled(true);
short bands = mEqualizer.getNumberOfBands();
final short minEQLevel = mEqualizer.getBandLevelRange()[0];
final short maxEQLevel = mEqualizer.getBandLevelRange()[1];
for (short i = 0; i < bands; i++) {
final short band = i;
如你所见,它使用的是mMediaPlayer.getAudioSessionId,这只是16个媒体播放器中的一个,那些是我的媒体播放器。我应该设置更多均衡器还是有办法将媒体播放器合并为一个?
MediaPlayer mMediaPlayer;
MediaPlayer mMediaPlayer1;
MediaPlayer mMediaPlayer2;
MediaPlayer mMediaPlayer3;
MediaPlayer mMediaPlayer4;
MediaPlayer mMediaPlayer5;
MediaPlayer mMediaPlayer6;
MediaPlayer mMediaPlayer7;
MediaPlayer mMediaPlayer8;
MediaPlayer mMediaPlayer9;
MediaPlayer mMediaPlayer10;
MediaPlayer mMediaPlayer11;
MediaPlayer mMediaPlayer12;
MediaPlayer mMediaPlayer13;
MediaPlayer mMediaPlayer14;
MediaPlayer mMediaPlayer15;