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

@ -17,61 +17,4 @@ public struct Sound
/// Total number of frames (considering channels)
/// </summary>
public uint FrameCount;
public readonly CBool IsValid => Raylib.IsSoundValid(this);
public readonly CBool IsPlaying => Raylib.IsSoundPlaying(this);
public static Sound Load(string fileName)
{
return Raylib.LoadSound(fileName);
}
public static Sound LoadFromWave(Wave wave)
{
return Raylib.LoadSoundFromWave(wave);
}
public readonly void Play()
{
Raylib.PlaySound(this);
}
public readonly void Pause()
{
Raylib.PauseSound(this);
}
public readonly void Resume()
{
Raylib.ResumeSound(this);
}
/// <summary>
/// Set pan where 0.5 is center
/// </summary>
public void SetPan(float pan)
{
Raylib.SetSoundPan(this, pan);
}
/// <summary>
/// Set pitch where 1.0 is base level
/// </summary>
public void SetPitch(float pitch)
{
Raylib.SetSoundPitch(this, pitch);
}
/// <summary>
/// Set volume from 0.0 to 1.0
/// </summary>
public void SetVolume(float volume)
{
Raylib.SetSoundVolume(this, volume);
}
public void Unload()
{
Raylib.UnloadSound(this);
}
}