在我的应用程序中,我有 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;