diff --git a/src/java.desktop/share/classes/com/sun/media/sound/ModelInstrument.java b/src/java.desktop/share/classes/com/sun/media/sound/ModelInstrument.java index 5ea60d25f71..9f2163fdef7 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/ModelInstrument.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/ModelInstrument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -113,8 +113,6 @@ public abstract class ModelInstrument extends Instrument { // Check if instrument is percussion. if (percussion) { boolean[] ch = new boolean[16]; - for (int i = 0; i < ch.length; i++) - ch[i] = false; ch[9] = true; return ch; } diff --git a/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java b/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java index fb44e4308d7..45cfe2cd091 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/SoftChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ package com.sun.media.sound; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -44,9 +43,6 @@ public final class SoftChannel implements MidiChannel, ModelDirectedPlayer { private static final boolean[] dontResetControls = new boolean[128]; static { - for (int i = 0; i < dontResetControls.length; i++) - dontResetControls[i] = false; - dontResetControls[0] = true; // Bank Select (MSB) dontResetControls[32] = true; // Bank Select (LSB) dontResetControls[7] = true; // Channel Volume (MSB) @@ -1032,9 +1028,7 @@ public final class SoftChannel implements MidiChannel, ModelDirectedPlayer { } if (keybasedcontroller_active[noteNumber] == null) { keybasedcontroller_active[noteNumber] = new boolean[128]; - Arrays.fill(keybasedcontroller_active[noteNumber], false); keybasedcontroller_value[noteNumber] = new double[128]; - Arrays.fill(keybasedcontroller_value[noteNumber], 0); } if (value == -1) { diff --git a/src/java.desktop/share/classes/com/sun/media/sound/SoftPerformer.java b/src/java.desktop/share/classes/com/sun/media/sound/SoftPerformer.java index 7cb41e9b90b..831cdfac4f3 100644 --- a/src/java.desktop/share/classes/com/sun/media/sound/SoftPerformer.java +++ b/src/java.desktop/share/classes/com/sun/media/sound/SoftPerformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import java.util.List; import java.util.Map; /** - * This class decodes information from ModelPeformer for use in SoftVoice. + * This class decodes information from ModelPerformer for use in SoftVoice. * It also adds default connections if they where missing in ModelPerformer. * * @author Karl Helgason @@ -694,13 +694,7 @@ public final class SoftPerformer { List connections = new ArrayList<>(); midi_ctrl_connections = new int[128][]; - for (int i = 0; i < midi_ctrl_connections.length; i++) { - midi_ctrl_connections[i] = null; - } midi_connections = new int[5][]; - for (int i = 0; i < midi_connections.length; i++) { - midi_connections[i] = null; - } int ix = 0; boolean mustBeOnTop = false;