diff --git a/include/libnyquist/WavEncoder.h b/include/libnyquist/WavEncoder.h index 76358b6..8aedfb6 100644 --- a/include/libnyquist/WavEncoder.h +++ b/include/libnyquist/WavEncoder.h @@ -33,6 +33,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace nqr { + // This is a naieve implementation of a resampling filter where a lerp is used as a bad low-pass. + // It very far from the ideal case and should be used with caution (or not at all) on signals that matter. + // It is included here to upsample 44.1k to 48k for the purposes of microphone input => Opus, where the the + // nominal frequencies of speech are particularly far from Nyquist. static inline void linear_resample(const double rate, const std::vector & input, std::vector & output, size_t samplesToProcess) { double virtualReadIndex = 0;