changeset 168:c9645471db6c

2008-10-08 Omair Majid <omajid@redhat.com> * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (isSynchronizationSupported): Return false. (synchronize): Commented out non-working code. Throw exception instead.
author Omair Majid <omajid@redhat.com>
date Wed, 08 Oct 2008 10:09:48 -0400
parents a4ec901897a5
children 96e885ef985c
files src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java
diffstat 1 files changed, 34 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- 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);
+		// }
 
 	}