Exactly so.
Example, If you generate a sine tone at 5 kHz and resample to 8 kHz, the Nyquist frequency is 4 kHz. “Proper” resampling (with anti-alias filtering) will remove the 5 kHz sine tone and the result will be silence. Resampling without anti-alias filtering will create a strong peak at 3 kHz (the alias frequency).
The code I provided will also create additional frequencies at a much lower level. These are the result of “distortion” cause by the linear interpolation.
