com.vwp.sound.mod.modplay.player
Interface LowLevelMixer

All Known Implementing Classes:
FastMixer, InterpolatingMixer

public interface LowLevelMixer


Method Summary
 void mix(int[] outBuffer, int[] outOffsetH, int outLength, short[] inBuffer, double[] inOffsetH, int inLength, int inSize, double grad)
          Resamples the data in inBuffer, placing the result in outBuffer.
 

Method Detail

mix

void mix(int[] outBuffer,
         int[] outOffsetH,
         int outLength,
         short[] inBuffer,
         double[] inOffsetH,
         int inLength,
         int inSize,
         double grad)
Resamples the data in inBuffer, placing the result in outBuffer.

Parameters:
outBuffer - is the output buffer
outOffsetH - outOffset[0] is where the mixer should start writing in outBuffer
outLength - s how far the mixer should fill outBuffer whith data
inBuffer - is a circular buffer containing raw data
inOffsetH - (outOffset[0] & (inSize-1)) is where the mixer should start to read data from inBuffer
inLength - the mixer should never read inBuffer further than (inLength & (inSize-1))
inSize - is the size of inBuffer
grad - is the realtionship between the samplig rates of the data in inBuffer an outBuffer It IS legal to read data from inBuffer before inOffset[0] and it IS legal to not use all the data in inBuffer. This way higher order interpolating can be implemented.

On return, outOffsetH[0] must contain the index of the last mixed sample pluss one in outBuffer and inOffsetH[0] must contain the last mixed sample pluss one in inBuffer.