protected int clock_interpolate(CycleCount delta_t, short buf[], int n,
			int interleave) {
		int s = 0;
		int i;

		for (;;) {
			int /* cycle_count */next_sample_offset = sample_offset
					+ cycles_per_sample;
			int /* cycle_count */delta_t_sample = next_sample_offset >> FIXP_SHIFT;
			if (delta_t_sample > delta_t.delta_t) {
				break;
			}
			if (s >= n) {
				return s;
			}
			for (i = 0; i < delta_t_sample - 1; i++) {
				clock();
			}
			if (i < delta_t_sample) {
				sample_prev = (short) output();
				clock();
			}

			delta_t.delta_t -= delta_t_sample;
			sample_offset = next_sample_offset & FIXP_MASK;

			short sample_now = (short) output();
			buf[s++ * interleave] = (short) (sample_prev + (sample_offset
					* (sample_now - sample_prev) >> FIXP_SHIFT));
			sample_prev = sample_now;
		}

		for (i = 0; i < delta_t.delta_t - 1; i++) {
			clock();
		}
		if (i < delta_t.delta_t) {
			sample_prev = (short) output();
			clock();
		}
		sample_offset -= delta_t.delta_t << FIXP_SHIFT;
		delta_t.delta_t = 0;
		return s;
	}