MetaSound Sine node appears not to create pure sine waves

Hi

If I create a MetaSound with a sine node, and set the frequency for instance to 5000Hz, I don’t get a pure sine wave. See the spectrum recorded via audacity below it has a strong partial close to 1000Hz.

A sine wave at 5000Hz in SuperCollider produces the following spectrum.

What is going on here ?

Thank you
Miguel Negrão

The same type of issue appears to be happening with the square wave

Example, square wave at 5000Hz

UE:

SuperCollider

Can anyone else replicate ?

Figured out the problem: it happens if the sample rate of the sound card is different from the sample rate of project. Seems similar to issue UE-199324.

So, we don’t have control of the sample rate of the user’s computer, isn’t UE audio system supposed to work fine on an project sample rate different from the sound card sample rate ? Is this a bug ?