# HG changeset patch # User Omair Majid # Date 1232651925 18000 # Node ID c29bbfa41f2b03576d99af8ba7f7f8aa6e1fb0b9 # Parent 15437352b69c92ae06fd520f64593b752b336cef 2009-01-22 Omair Majid Ioana Ivan * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (start): Return silently if already started. (stop): Return silently if already stopped. diff -r 15437352b69c -r c29bbfa41f2b ChangeLog --- a/ChangeLog Thu Jan 22 13:36:49 2009 -0500 +++ b/ChangeLog Thu Jan 22 14:18:45 2009 -0500 @@ -1,3 +1,10 @@ +2009-01-22 Omair Majid + Ioana Ivan + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (start): Return silently if already started. + (stop): Return silently if already stopped. + 2009-01-22 Deepak Bhole * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Use diff -r 15437352b69c -r c29bbfa41f2b pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Jan 22 13:36:49 2009 -0500 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Jan 22 14:18:45 2009 -0500 @@ -431,7 +431,7 @@ public byte[] native_update_volume() { return stream.native_update_volume(); } - + @Override public float getCachedVolume() { return stream.getCachedVolume(); @@ -521,12 +521,8 @@ @Override public void start() { - if (!isOpen) { - throw new IllegalStateException("Line not open"); - } - if (isStarted) { - throw new IllegalStateException("already started"); + return; } super.start(); @@ -547,8 +543,9 @@ throw new IllegalStateException("Line not open"); } + /* do what start does and ignore if called at the wrong time */ if (!isStarted) { - throw new IllegalStateException("not started, so cant stop"); + return; } if (clipThread.isAlive()) {