de.jreality.scene.data
Interface SampleReader


public interface SampleReader

Sample reader interface. Sample readers are intended to be chained, e.g., going from an AudioSource to a sample rate converter to a low-pass filter.

Author:
brinkman

Method Summary
 void clear()
           
 int getSampleRate()
           
 int read(float[] buffer, int initialIndex, int nSamples)
          Writes nSamples samples to the given buffer, starting at initialIndex, if possible
 

Method Detail

getSampleRate

int getSampleRate()
Returns:
sample rate of output

read

int read(float[] buffer,
         int initialIndex,
         int nSamples)
Writes nSamples samples to the given buffer, starting at initialIndex, if possible

Parameters:
buffer -
initialIndex -
nSamples -
Returns:
number of samples written (less than or equal to nSamples)

clear

void clear()