com.sun.media.sound
Class DLSSample

java.lang.Object
  extended by javax.sound.midi.SoundbankResource
      extended by com.sun.media.sound.DLSSample

public class DLSSample
extends javax.sound.midi.SoundbankResource

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
protected  ModelByteBuffer data
           
protected  javax.sound.sampled.AudioFormat format
           
protected  byte[] guid
           
protected  DLSInfo info
           
protected  DLSSampleOptions sampleoptions
           
 
Constructor Summary
DLSSample()
           
DLSSample(javax.sound.midi.Soundbank soundBank)
           
 
Method Summary
 java.lang.Object getData()
           
 ModelByteBuffer getDataBuffer()
           
 javax.sound.sampled.AudioFormat getFormat()
           
 byte[] getGuid()
           
 DLSInfo getInfo()
           
 java.lang.String getName()
           
 DLSSampleOptions getSampleoptions()
           
 void setData(byte[] data)
           
 void setData(byte[] data, int offset, int length)
           
 void setData(ModelByteBuffer data)
           
 void setFormat(javax.sound.sampled.AudioFormat format)
           
 void setGuid(byte[] guid)
           
 void setName(java.lang.String name)
           
 void setSampleoptions(DLSSampleOptions sampleOptions)
           
 java.lang.String toString()
           
 
Methods inherited from class javax.sound.midi.SoundbankResource
getDataClass, getSoundbank
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

guid

protected byte[] guid

info

protected DLSInfo info

sampleoptions

protected DLSSampleOptions sampleoptions

data

protected ModelByteBuffer data

format

protected javax.sound.sampled.AudioFormat format
Constructor Detail

DLSSample

public DLSSample(javax.sound.midi.Soundbank soundBank)

DLSSample

public DLSSample()
Method Detail

getInfo

public DLSInfo getInfo()

getData

public java.lang.Object getData()
Specified by:
getData in class javax.sound.midi.SoundbankResource

getDataBuffer

public ModelByteBuffer getDataBuffer()

getFormat

public javax.sound.sampled.AudioFormat getFormat()

setFormat

public void setFormat(javax.sound.sampled.AudioFormat format)

setData

public void setData(ModelByteBuffer data)

setData

public void setData(byte[] data)

setData

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

getName

public java.lang.String getName()
Overrides:
getName in class javax.sound.midi.SoundbankResource

setName

public void setName(java.lang.String name)

getSampleoptions

public DLSSampleOptions getSampleoptions()

setSampleoptions

public void setSampleoptions(DLSSampleOptions sampleOptions)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getGuid

public byte[] getGuid()

setGuid

public void setGuid(byte[] guid)