public int updatePosition(int p, boolean keyOff)
	{
		p++;
		if (loop && p>=position[loopEndPoint]) p=position[loopStartPoint];
		if (sustain && p>=position[sustainEndPoint] && !keyOff) p=position[sustainStartPoint];
		return p;
	}
public int updatePosition ( int p , boolean keyOff ) { p ++ ; if ( loop && p >= position [ loopEndPoint ] ) p = position [ loopStartPoint ] ; if ( sustain && p >= position [ sustainEndPoint ] && ! keyOff ) p = position [ sustainStartPoint ] ; return p ; }
Get the new position
@since 19.06.2006
@param p
@param keyOff
@return