Watch
2
0
Fork
You've already forked raylib-cs
0

Focus pr on explicit type and util changes

This commit is contained in:
Rgebee 2025-09-17 19:16:39 +01:00
commit be91fe9120
15 changed files with 18 additions and 856 deletions

View file

@ -28,41 +28,9 @@ public unsafe struct Wave
/// </summary>
public uint Channels;
//TODO: SPAN<byte> ?
// TODO: SPAN<byte>?
/// <summary>
/// Buffer data pointer
/// </summary>
public void* Data;
public readonly CBool IsValid => Raylib.IsWaveValid(this);
public static Wave Load(string fileName)
{
return Raylib.LoadWave(fileName);
}
public CBool Export(string fileName)
{
return Raylib.ExportWave(this, fileName);
}
public CBool ExportAsCode(string fileName)
{
return Raylib.ExportWaveAsCode(this, fileName);
}
public void Format(int sampleRate, int sampleSize, int channels)
{
Raylib.WaveFormat(ref this, sampleRate, sampleSize, channels);
}
public void Crop(int initFrame, int finalFrame)
{
Raylib.WaveCrop(ref this, initFrame, finalFrame);
}
public void Unload()
{
Raylib.UnloadWave(this);
}
}