Remove debug log from Audio.GenerateWave

This commit is contained in:
Alessandro Proto 2023-02-16 16:11:58 +01:00 committed by GitHub
parent 2f701a6338
commit ee44873e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,7 @@ public class Audio : IDisposable
Waveform.Noise => rng.NextDouble() * 2 - 1,
_ => throw new NotImplementedException(),
};
Console.WriteLine(value);
value = Math.Clamp(value, -1, 1);
var sample = (short)(value >= 0.0f ? value * short.MaxValue : value * short.MinValue * -1);
if (!BitConverter.IsLittleEndian)