title: What is the maximum and minimum value of android audiotrack, audio type of float?
body: <p>I need to output the audio from the left and right channels to the headphone jack, and the headphone jack to an oscilloscope. I can't get the correct audio waveform with <code>Float.MAX_VALUE</code> and <code>Float.MIN_VALUE</code>. Usually the 16-bit audio max/min is a short type with a value of +/-32767. So you can assign values with <code>Short.MAX_VALUE</code> and <code>Short_MIN_VALUE</code>. But currently my audio is of type float, ie <code>AudioFormat.ENCODING_PCM_FLOAT</code>, and using <code>Float.MAX_VALUE</code> and <code>Float.MIN_VALUE</code> does not get the correct audio waveform in the oscilloscope. The actual audio waveform will have 0.4 milliseconds of noise before and after, but when I take the float at 3.5f or -3.5f, the shape of the waveform looks correct, but it doesn't reach the maximum. So what is the maximum and minimum audio value of the float type?
  <a href="https://i.stack.imgur.com/jiqus.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jiqus.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/F4Ezj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F4Ezj.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/qa6qA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qa6qA.png" alt="enter image description here"></a></p>
  
  <p>The actual audio waveform will have 0.4 milliseconds of noise before and after.
  <a href="https://i.stack.imgur.com/JyUTO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JyUTO.jpg" alt="enter image description here"></a></p>
  
  <p>The correct waveform should be such a shape. If set to 3.5f/-3.5f, the shape is correct but not the maximum.
  <a href="https://i.stack.imgur.com/SX46F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SX46F.png" alt="enter image description here"></a></p>