JDK-4304737 : SourceDataLine will not restart after it has been close()'ed, open()'ed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2000-01-14
  • Updated: 2002-10-16
  • Resolved: 2002-10-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Description
I am attaching a test application that demonstrates this problem.

> java JavaSoundStreamPlayer

Load a sampled audio file, then try this sequence:
- Open
- Start (sound starts playing)
- Stop  (sound stops)
- Close
- Open
- Start (no sound is heard)

Querying Status shows that the SourceDataLine being used returns
isOpen()    - true
isRunning() - false
isActive()  - false
after Start is called the second time.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b04
2004-06-14

PUBLIC COMMENTS SourceDataLine will not restart after it has been close()'ed, open()'ed
2004-06-10

EVALUATION ###@###.### 2000-01-13 This is serious, but too late to get a fix into Kestrel RC1. Committing this to Merlin for now. michael.bundschuh@Eng 2000-08-25 No resource to fix for ladybird. Committing for merlin. ###@###.### 2002-07-18 Verified the existence of the bug. The SourceDataLine should throw LineUnavailableException, as it is stated in the open method: "Note that some lines, once closed, cannot be reopened. Attempts to reopen such a line will always result in a LineUnavailableException." ###@###.### 2002-07-18 Found the problem in MixerSourceLine, the implStarted variable wasn't reset to false upon close(). Fixed for mantis.
2002-07-18