# HG changeset patch # User Omair Majid # Date 1223474988 14400 # Node ID c9645471db6c67fc4be8c5b5563e5ce08728d2a1 # Parent a4ec901897a551c1782d32f74b86a5c557dd67ee 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (isSynchronizationSupported): Return false. (synchronize): Commented out non-working code. Throw exception instead. diff -r a4ec901897a5 -r c9645471db6c src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Oct 07 17:17:31 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:09:48 2008 -0400 @@ -393,42 +393,45 @@ @Override public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync) { - // FIXME - return true; + return false; } @Override public void synchronize(Line[] lines, boolean maintainSync) { - Line masterStream = null; - for (Line line : lines) { - if (line.isOpen()) { - masterStream = line; - break; - } - } - if (masterStream == null) { - // for now, can't synchronize lines if none of them is open (no - // stream pointer to pass) - // will see what to do about this later - throw new IllegalArgumentException(); - } + + throw new IllegalArgumentException( + "Mixer does not support synchronizing lines"); - try { - - for (Line line : lines) { - if (line != masterStream) { - - ((PulseAudioDataLine) line) - .reconnectforSynchronization(((PulseAudioDataLine) masterStream) - .getStream()); - - } - } - } catch (LineUnavailableException e) { - // we couldn't reconnect, so tell the user we failed by throwing an - // exception - throw new IllegalArgumentException(e); - } + // Line masterStream = null; + // for (Line line : lines) { + // if (line.isOpen()) { + // masterStream = line; + // break; + // } + // } + // if (masterStream == null) { + // // for now, can't synchronize lines if none of them is open (no + // // stream pointer to pass) + // // will see what to do about this later + // throw new IllegalArgumentException(); + // } + // + // try { + // + // for (Line line : lines) { + // if (line != masterStream) { + // + // ((PulseAudioDataLine) line) + // .reconnectforSynchronization(((PulseAudioDataLine) masterStream) + // .getStream()); + // + // } + // } + // } catch (LineUnavailableException e) { + // // we couldn't reconnect, so tell the user we failed by throwing an + // // exception + // throw new IllegalArgumentException(e); + // } }