if (sourceFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED)) {
if (sourceFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED) && targetEncoding instanceof SpeexEncoding) {
  public AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding,                                        AudioFormat sourceFormat)  {    if (sourceFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED)) {      if (sourceFormat.getChannels() > 2 || sourceFormat.getChannels() <= 0 ||          !sourceFormat.isBigEndian()) {        return NO_FORMAT;      }      else {        AudioFormat[] formats = {new AudioFormat(SpeexEncoding.SPEEX,                                                 sourceFormat.getSampleRate(),                                                 -1, // sample size in bits                                                 sourceFormat.getChannels(),                                                 -1, // frame size                                                 -1, // frame rate                                                 false)}; // little endian        return formats;      }    }    else if (sourceFormat.getEncoding().equals(SpeexEncoding.SPEEX)) {      AudioFormat[] formats = {new AudioFormat(sourceFormat.getSampleRate(),                                               16, // sample size in bits                                               sourceFormat.getChannels(),                                               true, // signed                                               false)}; // little endian (for PCM wav)      return formats;    }    else {      return NO_FORMAT;    }  }