--- old/src/share/classes/javax/sound/midi/SoundbankResource.java 2014-07-16 20:39:28.221108000 +0400 +++ new/src/share/classes/javax/sound/midi/SoundbankResource.java 2014-07-16 20:39:28.030097100 +0400 @@ -25,81 +25,72 @@ package javax.sound.midi; +import javax.sound.sampled.AudioInputStream; + /** - * A SoundbankResource represents any audio resource stored - * in a {@link Soundbank}. Common soundbank resources include: + * A {@code SoundbankResource} represents any audio resource stored in a + * {@link Soundbank}. Common soundbank resources include: * - *

- * Synthesizers that use wavetable synthesis or related - * techniques play back the audio in a sample when - * synthesizing notes, often when emulating the real-world instrument that - * was originally recorded. However, there is not necessarily a one-to-one - * correspondence between the Instruments and samples - * in a Soundbank. A single Instrument can use - * multiple SoundbankResources (typically for notes of dissimilar pitch or - * brightness). Also, more than one Instrument can use the same - * sample. + * Synthesizers that use wavetable synthesis or related techniques play back the + * audio in a sample when synthesizing notes, often when emulating the + * real-world instrument that was originally recorded. However, there is not + * necessarily a one-to-one correspondence between the {@code Instruments} and + * samples in a {@code Soundbank}. A single {@code Instrument} can use multiple + * SoundbankResources (typically for notes of dissimilar pitch or brightness). + * Also, more than one {@code Instrument} can use the same sample. * * @author Kara Kytle */ - public abstract class SoundbankResource { - /** - * The sound bank that contains the SoundbankResources + * The sound bank that contains the {@code SoundbankResources}. */ private final Soundbank soundBank; - /** - * The name of the SoundbankResource + * The name of the {@code SoundbankResource}. */ private final String name; - /** * The class used to represent the sample's data. */ private final Class dataClass; - /** * The wavetable index. */ //private final int index; - /** - * Constructs a new SoundbankResource from the given sound bank - * and wavetable index. (Setting the SoundbankResource's name, - * sampled audio data, and instruments is a subclass responsibility.) - * @param soundBank the sound bank containing this SoundbankResource - * @param name the name of the sample - * @param dataClass the class used to represent the sample's data + * Constructs a new {@code SoundbankResource} from the given sound bank and + * wavetable index. (Setting the {@code SoundbankResource's} name, sampled + * audio data, and instruments is a subclass responsibility.) * + * @param soundBank the sound bank containing this + * {@code SoundbankResource} + * @param name the name of the sample + * @param dataClass the class used to represent the sample's data * @see #getSoundbank * @see #getName * @see #getDataClass @@ -112,65 +103,65 @@ this.dataClass = dataClass; } - /** - * Obtains the sound bank that contains this SoundbankResource. - * @return the sound bank in which this SoundbankResource is stored + * Obtains the sound bank that contains this {@code SoundbankResource}. + * + * @return the sound bank in which this {@code SoundbankResource} is stored */ public Soundbank getSoundbank() { return soundBank; } - /** - * Obtains the name of the resource. This should generally be a string + * Obtains the name of the resource. This should generally be a string * descriptive of the resource. + * * @return the instrument's name */ public String getName() { return name; } - /** - * Obtains the class used by this sample to represent its data. - * The object returned by getData will be of this - * class. If this SoundbankResource object does not support - * direct access to its data, returns null. - * @return the class used to represent the sample's data, or - * null if the data is not accessible + * Obtains the class used by this sample to represent its data. The object + * returned by {@code getData} will be of this class. If this + * {@code SoundbankResource} object does not support direct access to its + * data, returns {@code null}. + * + * @return the class used to represent the sample's data, or null if the + * data is not accessible */ public Class getDataClass() { return dataClass; } - /** - * Obtains the sampled audio that is stored in this SoundbankResource. - * The type of object returned depends on the implementation of the - * concrete class, and may be queried using getDataClass. + * Obtains the sampled audio that is stored in this + * {@code SoundbankResource}. The type of object returned depends on the + * implementation of the concrete class, and may be queried using + * {@code getDataClass}. + * * @return an object containing the sampled audio data * @see #getDataClass */ public abstract Object getData(); - /** - * Obtains the index of this SoundbankResource into the - * Soundbank's set of SoundbankResources. + * Obtains the index of this {@code SoundbankResource} into the + * {@code Soundbank's} set of {@code SoundbankResources}. + * * @return the wavetable index */ //public int getIndex() { // return index; //} - /** * Obtains a list of the instruments in the sound bank that use the - * SoundbankResource for sound synthesis. - * @return an array of Instruments that reference this - * SoundbankResource + * {@code SoundbankResource} for sound synthesis. * + * @return an array of {@code Instruments} that reference this + * {@code SoundbankResource} * @see Instrument#getSamples */ //public abstract Instrument[] getInstruments();