Do not copy and paste (2)

class Sound : public AlsaParams {
public:
//	virtual int asound_fftcopy() = 0;
	int asound_fftcopy(); /* not a virtual function */
};

int Sound::asound_fftcopy() {
	/* copy into FFT input buffer */
	if(signal_end - signal_start >= nfft*channels) { /* this should always be true */
		auto p = signal_start;
		switch (channels) {
		case 1:
			for (int i = 0; i < nfft; i++) {
				in[i][0] = *p++ * audio_window[i];
				in[i][1] = 0.0; /* no imaginary part */
			}
			break;
		case 2:
			for (int i = 0; i < nfft; i++) {
				in[i][1] = *p++ * audio_window[i]; /* reverse I and Q */
				in[i][0] = *p++ * audio_window[i]; /* reverse I and Q */
			}
			break;
		default:
			exit(1);
		}
		return 0;
	} else { /* should never happen */
		cout << "Sound::asound_fftcopy((): error " << endl;
		return 1;
	}
}

This is slightly better, but using switch statements is not very recommended.