Range of values for GetMaxAmplitude

后端 未结 1 1404
自闭症患者
自闭症患者 2020-12-31 15:19

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 i

相关标签:
1条回答
  • 2020-12-31 16:06

    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.

    Very interesting idea though!!

    maybe something here will help:

    Microphone input

    EDIT:

    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.

    0 讨论(0)
提交回复
热议问题