对于GetMaxAmplitude值范围范围、GetMaxAmplitude

2023-09-05 08:33:21 作者:养猪场老板

我已经得到了在Android手机中使用的麦克风端口的外部一个有趣的想法。我头脑风暴的方式来使用Android手机登录烘烤温度在我的咖啡烘焙。这个想法突然出现在我的脑海。麦克风是一个低电压,所以是我的热电偶。于是我开始寻找通过Android的方法,看看是否有任何可能让我得到实际毫伏从端口读取。该GetMaxAmplitude功能是我发现的唯一的事情。有谁知道价值是由GetMaxAmplitude函数返回的范围是多少?

I've got an interesting idea for an outside of the box use of the mic port on an android phone. I'm brainstorming ways to use an android phone to log roast temperatures inside my coffee roaster. The thought popped into my head. A microphone is a low-voltage and so is my thermocouple. So I started looking through the android methods to see if there was anything that might allow me to get the actual millivolt reading from the port. The GetMaxAmplitude function is the only thing I found. Does anyone know the range of values that are returned by the GetMaxAmplitude function?

如果你知道这是行不通的,只是让我知道。

If you know that this will not work, just let me know.

在此先感谢,

推荐答案

嗯,我自己一直在努力寻找价值的绝对响了来自getMaxAmplitude()函数,但我一直没能找到任何确切的答案。有一个线程说,声音可以从0返回任何东西到25000我知道,最小值为0。此外,它返回一个整数,它只能包含整数,所以我不认为它实际上是返回原始毫伏读数,因为这通常会包含小数了。

Well, I myself have been working to find the absolute rang of values that come from the getMaxAmplitude() function, but I haven't been able to find any exact answers. There was one thread that said that voices can return anything from 0 to 25000. I do know that the minimum value is 0. Also, it returns an Integer, which can only contain whole numbers, so I don't think that it is actually returning the raw millivolt reading, since that would typically contain decimals, too.

虽然很有趣的想法!

也许这里的东西将帮助:

maybe something here will help:

麦克风输入

编辑:

我发现最大的价值!这是32767,这是最大的一个符号的16位整数。最小值是当然,0的,因为你不能少于没有声音。这也支持这一理论,getMaxAmplitude()不会返回实际的毫伏值,因为越来越32.8伏了麦克风......是不会发生的。

I have discovered the max value! it is 32767, which is the max for a signed 16-bit integer. The minimum value is of course, 0, because you can't have less than no sound. This also supports the theory that getMaxAmplitude() doesn't return the actual millivolt value, because getting 32.8 volts out of a microphone...isn't going to happen.