Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/media/sound/DLSRegion.java
38924 views
/*1* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24package com.sun.media.sound;2526import java.util.ArrayList;27import java.util.List;2829/**30* This class is used to store region parts for instrument.31* A region has a velocity and key range which it response to.32* And it has a list of modulators/articulators which33* is used how to synthesize a single voice.34* It is stored inside a "rgn " List Chunk inside DLS files.35*36* @author Karl Helgason37*/38public final class DLSRegion {3940public final static int OPTION_SELFNONEXCLUSIVE = 0x0001;41List<DLSModulator> modulators = new ArrayList<DLSModulator>();42int keyfrom;43int keyto;44int velfrom;45int velto;46int options;47int exclusiveClass;48int fusoptions;49int phasegroup;50long channel;51DLSSample sample = null;52DLSSampleOptions sampleoptions;5354public List<DLSModulator> getModulators() {55return modulators;56}5758public long getChannel() {59return channel;60}6162public void setChannel(long channel) {63this.channel = channel;64}6566public int getExclusiveClass() {67return exclusiveClass;68}6970public void setExclusiveClass(int exclusiveClass) {71this.exclusiveClass = exclusiveClass;72}7374public int getFusoptions() {75return fusoptions;76}7778public void setFusoptions(int fusoptions) {79this.fusoptions = fusoptions;80}8182public int getKeyfrom() {83return keyfrom;84}8586public void setKeyfrom(int keyfrom) {87this.keyfrom = keyfrom;88}8990public int getKeyto() {91return keyto;92}9394public void setKeyto(int keyto) {95this.keyto = keyto;96}9798public int getOptions() {99return options;100}101102public void setOptions(int options) {103this.options = options;104}105106public int getPhasegroup() {107return phasegroup;108}109110public void setPhasegroup(int phasegroup) {111this.phasegroup = phasegroup;112}113114public DLSSample getSample() {115return sample;116}117118public void setSample(DLSSample sample) {119this.sample = sample;120}121122public int getVelfrom() {123return velfrom;124}125126public void setVelfrom(int velfrom) {127this.velfrom = velfrom;128}129130public int getVelto() {131return velto;132}133134public void setVelto(int velto) {135this.velto = velto;136}137138public void setModulators(List<DLSModulator> modulators) {139this.modulators = modulators;140}141142public DLSSampleOptions getSampleoptions() {143return sampleoptions;144}145146public void setSampleoptions(DLSSampleOptions sampleOptions) {147this.sampleoptions = sampleOptions;148}149}150151152