[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-distro-pkg-dev
Subject: /hg/icedtea6: 2 new changesets
From: omajid () icedtea ! classpath ! org (omajid at icedtea ! classpath ! org)
Date: 2012-06-29 0:15:50
Message-ID: hg.054fb28a4e6f.1340928950.2873452341184383832 () icedtea ! classpath ! org
[Download RAW message or body]
changeset 054fb28a4e6f in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=054fb28a4e6f
author: Omair Majid <omajid at redhat.com>
date: Thu Jun 28 20:04:54 2012 -0400
Synchronize access to shared variable
The variable writeInterrupted is accessed everywhere while holding a lock on
'this' object, except in one location. Fix that.
2012-06-28 Omair Majid <omajid at redhat.com>
* pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
(write): Synchronize access to writeInterrupted flag.
changeset e77ff9c25f68 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e77ff9c25f68
author: Omair Majid <omajid at redhat.com>
date: Thu Jun 28 20:14:46 2012 -0400
R902: PulseAudioClip getMicrosecondsLength() returns length in milliseconds, not \
microseconds
Define a (correct) constant for converting from seconds to microsecond and use
it everywhere.
2012-06-28 Omair Majid <omajid at redhat.com>
* pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java
(getMicrosecondLength, getMicrosecondPosition)
(setMicrosecondPosition): Use correct factor to convert seconds to
microseconds.
* pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
(getMicrosecondPosition): Likewise.
* pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java:
Define SECONDS_TO_MICROSECONDS.
diffstat:
ChangeLog | \
16 ++++++++++ NEWS \
| 1 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java \
| 6 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java \
| 2 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java \
| 8 +++- 5 files changed, 27 insertions(+), 6 deletions(-)
diffs (101 lines):
diff -r f8a29d2a4ca4 -r e77ff9c25f68 ChangeLog
--- a/ChangeLog Thu Jun 28 13:27:42 2012 -0400
+++ b/ChangeLog Thu Jun 28 20:14:46 2012 -0400
@@ -1,3 +1,19 @@
+2012-06-28 Omair Majid <omajid at redhat.com>
+
+ * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java
+ (getMicrosecondLength, getMicrosecondPosition)
+ (setMicrosecondPosition): Use correct factor to convert seconds to
+ microseconds.
+ * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
+ (getMicrosecondPosition): Likewise.
+ * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java:
+ Define SECONDS_TO_MICROSECONDS.
+
+2012-06-28 Omair Majid <omajid at redhat.com>
+
+ * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
+ (write): Synchronize access to writeInterrupted flag.
+
2012-06-28 Omair Majid <omajid at redhat.com>
PR1050: Stream objects not garbage collected
diff -r f8a29d2a4ca4 -r e77ff9c25f68 NEWS
--- a/NEWS Thu Jun 28 13:27:42 2012 -0400
+++ b/NEWS Thu Jun 28 20:14:46 2012 -0400
@@ -19,6 +19,7 @@
- S6883983: JarVerifier dependency on sun.security.pkcs should be removed
- S4465490: Suspicious about double-check locking idiom being used in the code
* Bug fixes
+ - PR902: PulseAudioClip getMicrosecondsLength() returns length in milliseconds, \
not microseconds
- PR1050: Stream objects not garbage collected
New in release 1.11.3 (2012-06-12):
diff -r f8a29d2a4ca4 -r e77ff9c25f68 \
pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu \
Jun 28 13:27:42 2012 -0400
+++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu \
Jun 28 20:14:46 2012 -0400 @@ -343,7 +343,7 @@
return AudioSystem.NOT_SPECIFIED;
}
synchronized (clipLock) {
- return (long) (frameCount / currentFormat.getFrameRate() * 1000);
+ return (long) (frameCount / currentFormat.getFrameRate() * \
SECONDS_TO_MICROSECONDS); }
}
@@ -354,7 +354,7 @@
}
synchronized (clipLock) {
- return (long) (framesSinceOpen / currentFormat.getFrameRate() * 1000);
+ return (long) (framesSinceOpen / currentFormat.getFrameRate() * \
SECONDS_TO_MICROSECONDS); }
}
@@ -503,7 +503,7 @@
throw new IllegalStateException("Line not open");
}
- float frameIndex = microseconds * currentFormat.getFrameRate() / 1000;
+ float frameIndex = microseconds * currentFormat.getFrameRate() / \
SECONDS_TO_MICROSECONDS;
/* make frameIndex positive */
while (frameIndex < 0) {
diff -r f8a29d2a4ca4 -r e77ff9c25f68 \
pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java Thu \
Jun 28 13:27:42 2012 -0400
+++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java Thu \
Jun 28 20:14:46 2012 -0400 @@ -42,6 +42,8 @@
*/
interface PulseAudioPlaybackLine {
+ static final int SECONDS_TO_MICROSECONDS = 1000000;
+
/**
* Set the volume of the Line (ie, sink input, source, or sink)
*
diff -r f8a29d2a4ca4 -r e77ff9c25f68 \
pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu \
Jun 28 13:27:42 2012 -0400
+++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu \
Jun 28 20:14:46 2012 -0400 @@ -179,8 +179,10 @@
synchronized (eventLoop.threadLock) {
do {
- if (writeInterrupted) {
- return sizeWritten;
+ synchronized (this) {
+ if (writeInterrupted) {
+ return sizeWritten;
+ }
}
if (availableSize == -1) {
@@ -257,7 +259,7 @@
float frameRate = currentFormat.getFrameRate();
float time = framesSinceOpen / frameRate; // seconds
- long microseconds = (long) (time * 1000);
+ long microseconds = (long) (time * SECONDS_TO_MICROSECONDS);
return microseconds;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic