package audio
// BandpassShiftFilter applies a bandpass filter retaining frequencies between
// lowFreq and highFreq, shifts the retained band down to baseband (0 Hz),
// and downsamples to 2*(highFreq-lowFreq) Hz.
// Returns the processed samples and the new sample rate.
//
// For example, with --bandpass 8000-24000 on 250kHz audio:
// - Bandpass keeps only 8-24kHz content
// - Shift down by 8kHz so content is at 0-16kHz
// - Downsample from 250kHz to 32kHz
// - Spectrogram shows the 8-24kHz band as if it were 0-16kHz
// nextPowerOf2 returns the smallest power of 2 >= n.