Exemple #1
0
  @Override
  public boolean equals(final Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    RealAudioBuffer that = (RealAudioBuffer) o;

    if (frameNumber != that.frameNumber) return false;
    if (audioFormat != null ? !audioFormat.equals(that.audioFormat) : that.audioFormat != null)
      return false;
    if (!Arrays.equals(realData, that.realData)) return false;

    return true;
  }
 /** Inits Audio ressources from AudioSystem.<br> */
 protected void initLine() throws LineUnavailableException {
   log.info("initLine()");
   if (m_line == null) {
     createLine();
   }
   if (!m_line.isOpen()) {
     openLine();
   } else {
     AudioFormat lineAudioFormat = m_line.getFormat();
     AudioFormat audioInputStreamFormat =
         m_audioInputStream == null ? null : m_audioInputStream.getFormat();
     if (!lineAudioFormat.equals(audioInputStreamFormat)) {
       m_line.close();
       openLine();
     }
   }
 }