WIP: SoLoud audio system, make Sound be in 16-bit PCM.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user