JDK-4867093 : Javasound Ports duplicates ports with same "short name"
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-05-20
  • Updated: 2003-08-19
  • Resolved: 2003-08-19
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
5.0 tigerFixed
Description

Name: rl43681			Date: 05/20/2003


FULL PRODUCT VERSION :
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Hercules Game Theater XP sound card (which provides 2 Line In ports)

A DESCRIPTION OF THE PROBLEM :
I have a Hercules Game Theater XP sound card and in the Win2k mixer recording
properties two "Line In" faders are shown:
"Line In"
"Line In 2"

When I inspect the available Javasound Ports I get the following:
   Port Stereo Mix source port
     Controls[0]: CompoundControl: Stereo Mix Control containing Select,
Volume, and Balance Controls.
   Port COMPACT_DISC source port
     Controls[0]: CompoundControl: CD Player Control containing Select,
Volume,
and Balance Controls.
   Port MICROPHONE source port
     Controls[0]: CompoundControl: Microphone Control containing Select,
Microphone Boos, Volume, and Balance Cont

   Port LINE_IN source port
     Controls[0]: CompoundControl: Line In Control containing Select,
Volume,
and Balance Controls.
   Port LINE_IN source port
     Controls[0]: CompoundControl: Line In Control containing Select,
Volume,
and Balance Controls.
   Port Aux source port
     Controls[0]: CompoundControl: Aux Control containing Select, Volume,
and
Balance Controls.
   Port Aux 2 source port
     Controls[0]: CompoundControl: Aux 2 Control containing Select, Volume,
and
Balance Controls.
   Port S/PDIF In source port
     Controls[0]: CompoundControl: S/PDIF In Control containing Select,
Volume,
and Balance Controls.
   Port SPEAKER target port
     Controls[0]: FloatControl: Volume with current value: 0.54509807
(range:
0.0 - 1.0)
     Controls[1]: FloatControl: Balance with current value: -4.9742003E-8
(range: -1.0 - 1.0)
...

Notice the line below each "LINE_IN source port". The .toString() of these two
controls is identical. I would have expected one of them to read as follows:
Controls[0]: CompoundControl: Line In 2 Control containing Select, Volume,
and
Balance Controls.

I wrote a simple GUI to allow me to manipulate all the Ports and it appears that
these two Ports are identical as far as Javasound is concerned (when I
change a setting on the one Line In, that same setting is also modified on
the second Line In), but there really is a "Line In 2" on this card that I can't get to via Javasound Ports.

I verified the windows mixer can manipulate the two Line In's independently.
Changes to Volume, Balance, etc on one Line In do not affect the other.

It has been suggested on the Javasound Interest List that Javasound should use the "long names" provided for ports instead of the short ones, since the "long names" will be unique.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Find any audio hardware where the "short names" of the ports provided are identical on one or more ports, and Javasound will only allow access to one of theses ports.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All ports exposed by Javasound should be unique, and all ports available on the hardware should be accessable via Javasound.
ACTUAL -
Ports with identical "short names" are not seen as unique by Javasound and a single port is duplicated, while other ports with the same short name are not reachable.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
no real workaround to get to ports from Javasound that have duplicate short names.
(Review ID: 185991) 
======================================================================

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

EVALUATION ###@###.### 2003-05-22 The Ports in 1.4.2 return the "short name" of the windows mixer drivers. this was chosen for nicer display on GUI elements. However, it seems that some Windows drivers just truncate the long name and return it as short name. That makes it impossible to distinguish different Ports with truncated running number. Java Sound should therefore change the implementation to use the long name as returned by Windows' drivers.
11-06-2004

PUBLIC COMMENTS Javasound Ports duplicates ports with same "short name"
10-06-2004