[6823445]: Gervill SoftChannel/ResetAllControllers jtreg test fails after portamento fix from last merge. - APPROVED
Alex Menkov
alex.menkov at sun.com
Mon Mar 30 10:06:06 PDT 2009
approved.
Regards
Alex
Karl Helgason wrote:
> Hi,
> I need both code reviewer and a bug number for this fix.
>
> regards,
> Karl
>
> # HG changeset patch
> # User kalli
> # Date 1238188182 0
> # Node ID 87b4aa98cc2724434d164e152707c34a51729440
> # Parent d48eeb51f952a0a3fce147e3d809c9543de6a50e
> [New Bug]: Gervill SoftChannel/ResetAllControllers jtreg test fails after portamento fix from last merge.
>
> diff -r d48eeb51f952 -r 87b4aa98cc27 src/share/classes/com/sun/media/sound/SoftChannel.java
> --- a/src/share/classes/com/sun/media/sound/SoftChannel.java Fri Mar 27 21:07:41 2009 +0000
> +++ b/src/share/classes/com/sun/media/sound/SoftChannel.java Fri Mar 27 21:09:42 2009 +0000
> @@ -67,7 +67,6 @@
> dontResetControls[77] = true; // Sound Controller 8 (GM2 default: Vibrato Depth)
> dontResetControls[78] = true; // Sound Controller 9 (GM2 default: Vibrato Delay)
> dontResetControls[79] = true; // Sound Controller 10 (GM2 default: Undefined)
> - dontResetControls[84] = true; // Portamento Controller
> dontResetControls[120] = true; // All Sound Off
> dontResetControls[121] = true; // Reset All Controllers
> dontResetControls[122] = true; // Local Control On/Off
> @@ -94,7 +93,6 @@
> protected double portamento_time = 1; // keyschanges per control buffer time
> protected int[] portamento_lastnote = new int[128];
> protected int portamento_lastnote_ix = 0;
> - private int portamento_control_note = -1;
> private boolean portamento = false;
> private boolean mono = false;
> private boolean mute = false;
> @@ -370,12 +368,12 @@
> voice.setSoloMute(solomute);
> if (releaseTriggered)
> return;
> - if (portamento_control_note != -1) {
> + if (controller[84] != 0) {
> voice.co_noteon_keynumber[0]
> - = (tuning.getTuning(portamento_control_note) / 100.0)
> + = (tuning.getTuning(controller[84]) / 100.0)
> * (1f / 128f);
> voice.portamento = true;
> - portamento_control_note = -1;
> + controlChange(84, 0);
> } else if (portamento) {
> if (mono) {
> if (portamento_lastnote[0] != -1) {
> @@ -383,7 +381,7 @@
> = (tuning.getTuning(portamento_lastnote[0]) / 100.0)
> * (1f / 128f);
> voice.portamento = true;
> - portamento_control_note = -1;
> + controlChange(84, 0);
> }
> portamento_lastnote[0] = noteNumber;
> } else {
> @@ -450,19 +448,19 @@
> }
> }
>
> - if (portamento_control_note != -1) {
> + if (controller[84] != 0) {
> boolean n_found = false;
> for (int i = 0; i < voices.length; i++) {
> if (voices[i].on && voices[i].channel == channel
> && voices[i].active
> - && voices[i].note == portamento_control_note
> + && voices[i].note == controller[84]
> && voices[i].releaseTriggered == false) {
> voices[i].portamento = true;
> voices[i].setNote(noteNumber);
> n_found = true;
> }
> }
> - portamento_control_note = -1;
> + controlChange(84, 0);
> if (n_found)
> return;
> }
> @@ -1154,9 +1152,6 @@
> }
> }
> break;
> - case 84:
> - portamento_control_note = value;
> - break;
> case 98:
> nrpn_control = (nrpn_control & (127 << 7)) + value;
> rpn_control = RPN_NULL_VALUE;
> @@ -1398,10 +1393,6 @@
> controlChange(i, 0);
> }
>
> - // Portamento Controller (0x54) has to reset
> - // to -1 which mean that Portamento Controller is off
> - portamento_control_note = -1;
> -
> controlChange(71, 64); // Filter Resonance
> controlChange(72, 64); // Release Time
> controlChange(73, 64); // Attack Time
>
More information about the jdk6-dev
mailing list