Number of groups in Android Equalizer

My question is simple: what is the default number of bands provided by the Android built-in equalizer? Also, what is the guaranteed minimum number of lanes?

As far as I researched, the answer seems to be 5, but it is not very well documented. However, testing it on my devices, which is currently available, I got the following result:

  • HTC Desire S works with Android 2.3.5: 5 ranges
  • Sony Xperia Tipo runs Android 4.0.x: 5 ranges
  • however Nexus 4 is running Android 4.3.1: 6 ranges

I get the following numbers:

MediaPlayer mp=new MediaPlayer(this);
/* some initialization */
Equalizer eq=new Equalizer(0, mp.getAudioSessionId());
short bands=eq.getNumberOfBands();

So, on some devices, I can get more bands, but the minimum number is 5?

Also, is there a good approach that I visualize part of the equalizer user interface dynamically, depending on how many bands the current device has, and then allows the user to set their own preferences?

Thanks in advance!

+2
source share
3 answers

I do not think that there is a number of default groups, and you should not create your application, assuming that there is a constant / fixed number of default bands.

Definitely you will have to dynamically display your UI equalizer based on the device number in the ranges.

+2
source

. . Samsung 13 , .

.

Equalizer eq=new Equalizer(0, mp.getAudioSessionId());
short bands=eq.getNumberOfBands();
LinearLayout parentViewToAllEqualizerSeekBars = findViewById...
for(int i=0;i<(int)bands.length;i++)
{
//create seekbar programmatically and set it min max and add to the view
Seekbar seek = new SeekBar(this);
seek.min(equalizerMinLevel....)
seek.max(equalizerMaxLevel..)
parentViewToAllEqualizerSeekBars .addView(seek);
}

. 5 13.

:

, equalizer!=null

+2

-

- 8, 8 == numberOfBands

android

0

All Articles