changeset 128:fda25668e4d1

2008-09-19 Omair Majid <omajid@redahat.com> * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (connectLine): Changed the buffer attributes so that corking/uncorking doesnt hang the program.
author Omair Majid <omajid@redhat.com>
date Fri, 19 Sep 2008 13:06:48 -0400
parents da120992e52b
children 3a9c7727be22
files src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java	Fri Sep 19 12:56:33 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java	Fri Sep 19 13:06:48 2008 -0400
@@ -106,7 +106,8 @@
 
 	protected void connectLine(int bufferSize) throws LineUnavailableException {
 		StreamBufferAttributes bufferAttributes = new StreamBufferAttributes(
-				bufferSize, bufferSize / 4, bufferSize / 4, bufferSize / 10, 0);
+				bufferSize, bufferSize / 4, bufferSize / 8,
+				((bufferSize / 10) > 100 ? bufferSize / 10 : 100), 0);
 
 		synchronized (eventLoop.threadLock) {
 			stream.connectForPlayback(Stream.DEFAULT_DEVICE, bufferAttributes);