What is the meaning of frame size in Audioformat?
As outlined in the previous question, it depends on what a frame is. For PCM, the frame size is just the number of bytes for one sample, multiplied with the number of channels. Note that usually each individual sample is represented in an integer number of bytes. For instance, a 12 bit stereo frame uses 4 bytes, not 3. For compressed formats, the frame size is some more-or-less arbitrarily chosen number that is a property of the compression schema. Some compression methods do not have a constant, but variable frame size. In this case the value returned by AudioFormat.getFrameSize() is -1.