APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public final Class DLSSample

extends SoundbankResource
Class Inheritance
Imports
java.io.InputStream, java.util.Arrays, javax.sound.midi.Soundbank, .SoundbankResource, javax.sound.sampled.AudioFormat, .AudioInputStream

This class is used to store the sample data itself. A sample is encoded as PCM audio stream and in DLS Level 1 files it is always a mono 8/16 bit stream. They are stored just like RIFF WAVE files are stored. It is stored inside a "wave" List Chunk inside DLS files.
Author
Karl Helgason

Field Summary

Modifier and TypeField and Description
pack-priv ModelByteBuffer
pack-priv AudioFormat
pack-priv byte[]
pack-priv DLSInfo
pack-priv DLSSampleOptions

Constructor Summary

AccessConstructor and Description
public
DLSSample(Soundbank soundBank)

public

Method Summary

Modifier and TypeMethod and Description
public Object
getData()

Implements abstract javax.sound.midi.SoundbankResource.getData.

Obtains the sampled audio that is stored in this SoundbankResource.

public ModelByteBuffer
public AudioFormat
public byte[]
public DLSInfo
public String
getName()

Overrides javax.sound.midi.SoundbankResource.getName.

Obtains the name of the resource.

public DLSSampleOptions
public void
public void
setData(byte[] data)

public void
setData(byte[] data, int offset, int length)

public void
public void
setGuid(byte[] guid)

public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from javax.sound.midi.SoundbankResource:
getDataClassgetSoundbank

Field Detail

databack to summary
pack-priv ModelByteBuffer data
formatback to summary
pack-priv AudioFormat format
guidback to summary
pack-priv byte[] guid
infoback to summary
pack-priv DLSInfo info
sampleoptionsback to summary
pack-priv DLSSampleOptions sampleoptions

Constructor Detail

DLSSampleback to summary
public DLSSample(Soundbank soundBank)
DLSSampleback to summary
public DLSSample()

Method Detail

getDataback to summary
public Object getData()

Implements abstract javax.sound.midi.SoundbankResource.getData.

Doc from javax.sound.midi.SoundbankResource.getData.

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.

Annotations
@Override
getDataBufferback to summary
public ModelByteBuffer getDataBuffer()
getFormatback to summary
public AudioFormat getFormat()
getGuidback to summary
public byte[] getGuid()
getInfoback to summary
public DLSInfo getInfo()
getNameback to summary
public String getName()

Overrides javax.sound.midi.SoundbankResource.getName.

Doc from javax.sound.midi.SoundbankResource.getName.

Obtains the name of the resource. This should generally be a string descriptive of the resource.

Annotations
@Override
getSampleoptionsback to summary
public DLSSampleOptions getSampleoptions()
setDataback to summary
public void setData(ModelByteBuffer data)
setDataback to summary
public void setData(byte[] data)
setDataback to summary
public void setData(byte[] data, int offset, int length)
setFormatback to summary
public void setFormat(AudioFormat format)
setGuidback to summary
public void setGuid(byte[] guid)
setNameback to summary
public void setName(String name)
setSampleoptionsback to summary
public void setSampleoptions(DLSSampleOptions sampleOptions)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override