Class PcmFormat

java.lang.Object
javax.sound.sampled.AudioFormat
net.avadeaux.klipspringer.codec.PcmFormat

public class PcmFormat extends AudioFormat
Audio format specification that extends AudioFormat with some convenience functions and restrictions. The sample size (frame size divided by number of channels) must be 1 or 2 for bit depth 8 or smaller, 2 for bit depth 9 to 16, 3 or 4 for bit depth 17 to 24, and 4 for bit depth 25 to 32. Bit depth larger than 32 is not allowed. Attempting to construct a PCM format that does not conform to these rules results in exception. The additional field for significant bits per sample should normally be equal to bits per sample, but may be smaller if the bit depth has been scaled up by left shifting, in which case the significant number of bits should be displayed as the actual quality.
  • Field Details

  • Constructor Details

    • PcmFormat

      public PcmFormat(int rate, int bips, int channels, boolean signed, int fs, ByteOrder order, int significantBips)
      Constructor that specifies all fields.
    • PcmFormat

      public PcmFormat(int rate, int bips, int channels)
      Constructor that specifies sound quality and sets other parameters to standard values.
  • Method Details