在Android的均衡器波段数量 [英] Number of bands in Android Equalizer

查看:283
本文介绍了在Android的均衡器波段数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单:什么是所提供的带的默认数量的内置Android均衡器?此外,什么是乐队的保证最少?

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

据我研究,答案似乎是5,但它不很好的记录。然而,在我的设备,这是目前测试它,我得到了以下结果:

As far as I researched, the answer appears 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的运行Android 2.3.5: 5
  • 在索尼Xperia TIPO运行Android 4.0.x的: 5
  • 然而,的Nexus 4运行的是Android 4.3.1: 6
  • HTC Desire S running android 2.3.5: 5 bands
  • Sony Xperia Tipo running android 4.0.x: 5 bands
  • however, Nexus 4 running Android 4.3.1: 6 bands

我得到theese号码的方法如下:

The way I get theese numbers is the following:

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

因此​​,在某些设备,我可能能够获得更多的频带,但最小数目是5〜

So, on some devices, I may be able to get more bands, but the minimum number is 5?

此外,是一个好办法,我呈现均衡器的UI部分动态,取决于有多少带了当前设备,然后让用户设置自己的preferences?

Also, is that a good approach that I render the UI part of the equalizer dynamically, depending on how much bands the current device has, and then let the user set his own preferences?

在此先感谢!

推荐答案

我不认为这是乐队的默认号码,你不应该建立你的应用假设有乐队的默认/固定数量。

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

当然你必须动态地呈现您的UI均衡的基础上,乐队的设备数量。

Definitely you will have to render your UI equalizer dynamically, based on device number of bands.

这篇关于在Android的均衡器波段数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆