|
Quick Lists
|
|
Bug ID:
|
4791152
|
|
Votes
|
1
|
|
Synopsis
|
SPEC: description of isRunning(), isActive() is incomplete
|
|
Category
|
java:classes_sound
|
|
Reported Against
|
mantis-beta
|
|
Release Fixed
|
|
|
State
|
4-Defer,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
4297981
|
|
Submit Date
|
10-DEC-2002
|
|
Description
|
The J2SE 1.4 API spec reads:
"javax.sound.sampled
Interface DataLine
public boolean isRunning()
Indicates whether the line is running. The default is false. An open line
begins running when the first data is presented in response to an
invocation of the start method, and continues until presentation ceases
in response to a call to stop or because playback completes."
The description is incomplete since the specification
does not specify behavior of the method if data is not presented.
Also description is ambiguous because specification does not
define where, when, how, and which "the first data" should be presented in
response to an invocation of the start method for switching line to
a running state.
As well, the specification is unclear about what the distinction of
the methods isRunning and isActive is.
======================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
xxxxx@xxxxx 2002-12-10
Indeed I guess nobody ever knew how the method are really distinguished. As much as I see it (and unfortunately, from the implementation), a line is active in between calls to start() and stop(). In that sense, active means that the line is ready to take or give data. Running is tightly bound to data flow in the line. I.e. when you start a SourceDataLine but never write data to it, the line should not be running. This also means that a line should become not running on buffer underrun/overflow.
Since this is a change that must also be verified in the implementation, committing to Tiger.
xxxxx@xxxxx 2003-10-09
See also 4297981: it requested to rename isRunning to isStarted, but was not approved by CCC. Thinking of isRunning as equivalent to isStarted makes sense. But it is not obvious why START and STOP events should then be bound to isActive. Therefore I postpone this bug once again. It needs more discussion. Do we need ACTIVE/INACTIVE events? Should we consider an isStarted() method for mustang? How about notification of underruns/overflows?
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |