private int evaluateWave(int amplitude, int phase, int table) {
		if (table == 1)
			if ((phase & 0x7fff) < 16384)
				return amplitude;
			else
				return -amplitude;
		if (table == 2)
			return sine[phase & 0x7fff] * amplitude >> 14;
		if (table == 3)
			return ((phase & 0x7fff) * amplitude >> 14) - amplitude;
		if (table == 4)
			return noise[phase / 2607 & 0x7fff] * amplitude;
		else
			return 0;
	}