FileDocCategorySizeDatePackage
AudioCodec.javaAPI DocJMF 2.1.1e1380Mon May 12 12:20:46 BST 2003com.sun.media.codec.audio

AudioCodec

public abstract class AudioCodec extends BasicCodec

Fields Summary
Constructors Summary
Methods Summary
public booleancheckFormat(javax.media.Format format)
Checks the header of the compressed audio packet and detects any format changes. Does not modify the buffer in any way. TBD: how to select spesific output format

       if (inputFormat == null  ||
           outputFormat == null ||
           format != inputFormat ||
           !format.equals(inputFormat) ) {
              inputFormat = format;
              Format fs[] = getSupportedOutputFormats(format);
              outputFormat = (AudioFormat)fs[0];
       }
       return outputFormat != null;
    
public javax.media.FormatsetInputFormat(javax.media.Format format)

      if (matches(format, inputFormats) == null)
          return null;
      inputFormat = format;
      return format;
    
public javax.media.FormatsetOutputFormat(javax.media.Format format)

      if (matches(format, getSupportedOutputFormats(inputFormat)) == null)
          return null;
      if (!(format instanceof AudioFormat))
          return null;
      outputFormat = (AudioFormat)format;
      return format;