- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    1.4.1
- 
        mantis
- 
        generic
- 
        generic
Name: fb126949 Date: 09/27/2002
if you want to create e.g. a mono PCM AudioFormat with 18 bits sample size, the frame size should be 3 bytes. But the second constructor of AudioFormat creates an instance of AudioFormat with a 2 byte frame size.
The following code demonstrates the problem:
int bits = 18;
AudioFormat format = new AudioFormat(44100.0f, bits, 1, true, false);
if (format.getFrameSize() * 8 < bits) {
System.out.println("bits = "+bits+" do not fit into a "+format.getFrameSize()+" bytes sample!");
throw new Exception("Test failed");
} else
System.out.println("bits = "+bits+" fit OK into a "+format.getFrameSize()+" bytes sample!");
System.out.println("Test passed");
======================================================================