Skip to content

Commit

Permalink
remove unneeded float cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytra committed Dec 28, 2024
1 parent d8297bf commit 865c168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ProjectObsidian/ProtoFlux/Audio/SineGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void Read<S>(Span<S> buffer) where S : unmanaged, IAudioSample<S>
float advance = 1f / (float)base.Engine.AudioSystem.SampleRate * (MathX.PI * 2f) * (float)Frequency;
for (int i = 0; i < buffer.Length; i++)
{
tempBuffer[i] = (float)MathX.Sin(time + Phase) * MathX.Clamp01(Amplitude);
tempBuffer[i] = MathX.Sin(time + Phase) * MathX.Clamp01(Amplitude);
time += advance;
}
double position = 0.0;
Expand Down

0 comments on commit 865c168

Please sign in to comment.