com.vwp.sound.mod.modplay.player
Class FastMixer

java.lang.Object
  extended by com.vwp.sound.mod.modplay.player.FastMixer
All Implemented Interfaces:
LowLevelMixer

public class FastMixer
extends java.lang.Object
implements LowLevelMixer


Constructor Summary
FastMixer()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastMixer

public FastMixer()
Method Detail

mix

public void mix(int[] outBuffer,
                int[] outOffsetH,
                int outLength,
                short[] inBuffer,
                double[] inOffsetH,
                int inLength,
                int inSize,
                double grad)
Description copied from interface: LowLevelMixer
Resamples the data in inBuffer, placing the result in outBuffer.

Specified by:
mix in interface LowLevelMixer
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.