< prev index next >

src/java.desktop/share/classes/com/sun/media/sound/SimpleInstrument.java

Print this page

        

*** 20,33 **** --- 20,35 ---- * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + package com.sun.media.sound; import java.util.ArrayList; import java.util.List; + import javax.sound.midi.Patch; /** * A simple instrument that is made of other ModelInstrument, ModelPerformer * objects.
*** 46,57 **** } protected int preset = 0; protected int bank = 0; protected boolean percussion = false; protected String name = ""; ! protected List<SimpleInstrumentPart> parts ! = new ArrayList<SimpleInstrumentPart>(); public SimpleInstrument() { super(null, null, null, null); } --- 48,58 ---- } protected int preset = 0; protected int bank = 0; protected boolean percussion = false; protected String name = ""; ! protected List<SimpleInstrumentPart> parts = new ArrayList<>(); public SimpleInstrument() { super(null, null, null, null); }
*** 119,128 **** --- 120,130 ---- public void add(ModelInstrument ins) { add(ins.getPerformers()); } + @Override public ModelPerformer[] getPerformers() { int percount = 0; for (SimpleInstrumentPart part : parts) if (part.performers != null)
*** 164,185 **** --- 166,190 ---- } return performers; } + @Override public Object getData() { return null; } + @Override public String getName() { return this.name; } public void setName(String name) { this.name = name; } + @Override public ModelPatch getPatch() { return new ModelPatch(bank, preset, percussion); } public void setPatch(Patch patch) {
< prev index next >