WIP: SoLoud audio system, make Sound be in 16-bit PCM.

This commit is contained in:
2024-10-28 23:13:14 +01:00
parent 99624e152d
commit e51d28ce89
10 changed files with 91 additions and 44 deletions

View File

@@ -34,6 +34,7 @@ public class TestGame : Game
}
ResourceManager.TryLoad("icon.png", out _icon);
ResourceManager.TryLoad("sounds/test_sound_mono.ogg", out _sound);
if (!ResourceManager.TryLoad("fire_effect.toml", out _fireEffect))
{
@@ -52,8 +53,9 @@ public class TestGame : Game
{
if (Input.IsActionPressed("reload"))
{
ResourceManager.Reload();
_particleSystem!.RestartEmitter(_emitterId);
// ResourceManager.Reload();
// _particleSystem!.RestartEmitter(_emitterId);
AudioSystem.PlaySound(_sound.Value);
}
if (Input.KeyboardKeyJustPressed(KeyboardKey.One))
@@ -106,5 +108,6 @@ public class TestGame : Game
private int _emitterId;
private ResourceRef<ParticleEmitterSettingsResource> _fireEffect;
private ResourceRef<Font> _font;
private ResourceRef<Sound> _sound;
private ResourceRef<Texture2d> _icon;
}