quentinc.audio
Class Sample

java.lang.Object
  extended by quentinc.audio.Clip
      extended by quentinc.audio.Sample
Direct Known Subclasses:
Stream

public class Sample
extends Clip

A sample is enttirely loaded and stay in memory. It can be played more than once in the same time, and it is fast started. It is designed for short sounds which have to be played often.


Method Summary
 void close()
          Close the clip and release all associated resources.
 float getDuration()
          Get the duration of this clip in seconds. -1 = not known.
 int getDurationInFrames()
          Get the duration of this clip in frames. -1 = not known.
 float getReferenceDistance()
          GEt the reference distance for the sample.
 Sample setReferenceDistance(float f)
          Set the reference distance for the sample.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDurationInFrames

public int getDurationInFrames()
Description copied from class: Clip
Get the duration of this clip in frames. -1 = not known.

Specified by:
getDurationInFrames in class Clip

getDuration

public float getDuration()
Description copied from class: Clip
Get the duration of this clip in seconds. -1 = not known.

Specified by:
getDuration in class Clip

getReferenceDistance

public float getReferenceDistance()
GEt the reference distance for the sample.


setReferenceDistance

public Sample setReferenceDistance(float f)
Set the reference distance for the sample. This method allow to set it once for all channels playing this sample.


close

public void close()
Description copied from class: Clip
Close the clip and release all associated resources.

Overrides:
close in class Clip