changeset in /hg/pulseaudio: 2008-10-06 Omair Majid <omajid at redh...
Omair Majid
omajid at redhat.com
Mon Oct 6 14:03:18 PDT 2008
changeset 6695cbc7fe43 in /hg/pulseaudio
details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6695cbc7fe43
description:
2008-10-06 Omair Majid <omajid at redhat.com>
* src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java
(read): Continue reading if peek returns null.
* src/native/org_classpath_icedtea_pulseaudio_Stream.c
(Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1peek):
Return null if no data to read.
diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 3 ++-
src/native/org_classpath_icedtea_pulseaudio_Stream.c | 5 +++++
diffs (32 lines):
diff -r fa7dd0d762f1 -r 6695cbc7fe43 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java
--- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 15:36:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 17:03:22 2008 -0400
@@ -219,11 +219,12 @@ public class PulseAudioTargetDataLine ex
/* read a fragment, and drop it from the server */
currentFragment = stream.peek();
+
stream.drop();
if (currentFragment == null) {
System.out
.println("DEBUG: PulseAudioTargetDataLine:read(): error in stream.peek()");
- return sizeRead;
+ continue;
}
bytesRead = Math.min(currentFragment.length,
diff -r fa7dd0d762f1 -r 6695cbc7fe43 src/native/org_classpath_icedtea_pulseaudio_Stream.c
--- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Oct 06 15:36:55 2008 -0400
+++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Oct 06 17:03:22 2008 -0400
@@ -560,6 +560,11 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl
return NULL;
}
+ /* no data available */
+ if (startLocation == NULL) {
+ return NULL;
+ }
+
jsize length = count;
jbyteArray data = (*env)->NewByteArray(env, length);
More information about the distro-pkg-dev
mailing list