JDK-6713464 : Method controlChange() does not reset the lower 7 bits of a 14-bit controller
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: OpenJDK6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-06-11
  • Updated: 2012-03-22
  • Resolved: 2008-09-24
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
OpenJDK6Resolved
Related Reports
Duplicate :  
Description
The specification on javax.sound.midi.MidiChannel.controlChange(int controller,int value) says:

------------------------------------------------------------------------------------------
 . . .
The value of a 14-bit controller is determined by the interaction of the two halves.
When the most significant 7 bits of a controller are set (using controller numbers 0
through 31), the lower 7 bits are automatically set to 0.
 . . .
------------------------------------------------------------------------------------------

The testcase api/javax_sound/midi/MidiChannel/index.html#control[control003] checks this behavior.
Here is the excerpt of the meaningful part of the code:

------------------------------------------------------------------------------
        int val = 16;
        int contr = 39; //Channel volume LSB

        try {
             . . .
            //Channel volume MSB

            chan.controlChange((contr - 32), val);

            . . .
            //Channel volume LSB
            if (chan.getController(contr) != 0) {
                failed = true;
                log.println("Controller(" + contr +") does not return proper"
                        + " value: " + chan.getController(contr));
            }

            . . .
------------------------------------------------------------------------------

And here is the output:

Controller(39) does not return proper value: 16
control003: Failed.

Comments
EVALUATION Resolved as expected by fix for 6717691.
24-09-2008

EVALUATION Yes, the tests should pass.
19-08-2008