org.tritonus.saol.engine
Interface Output

All Known Subinterfaces:
SystemOutput
All Known Implementing Classes:
AbstractInstrument, AudioOutputStreamOutput, Bus, FileOutput

public interface Output

Output method for the SA engine. This interface abstracts the way calculated samples are output from the engine. The engine only calls this interface, while implementations of this interface write the samples to a file, a line, a network socket or whatever else.


Method Summary
 void clear()
          Initiate the cumulation of a sample value.
 int getWidth()
          Gives the width of this output.
 void output(float fSample)
          Add the sample value of one instrument.
 void output(float[] afSamples)
          Add sample values of one instrument.
 

Method Detail

getWidth

int getWidth()
Gives the width of this output.


clear

void clear()
Initiate the cumulation of a sample value. Sets the values of all samples to 0.0. This method must be called in an a-cycle before any instrument's a-cycle code is executed.


output

void output(float fSample)
Add the sample value of one instrument. This method can be called by instrument's a-cycle code to output the sample value the instrument has calculated for this a-cycle. The current hacky version allows only for mono samples.


output

void output(float[] afSamples)
Add sample values of one instrument. This method can be called by instrument's a-cycle code to output the sample value the instrument has calculated for this a-cycle. The current hacky version allows only for mono samples.