Bring back FMOD audio backend.
This commit is contained in:
@@ -9,7 +9,7 @@ public class TestGame : Game
|
||||
protected override void OnStart()
|
||||
{
|
||||
_renderer = new RaylibRenderer();
|
||||
_audioBackend = new OpenALAudioBackend();
|
||||
_audioBackend = new FmodAudioBackend();
|
||||
_inputHandler = new RaylibInputHandler();
|
||||
|
||||
_renderer.CreateAndInitialize(new WindowSettings()
|
||||
@@ -20,6 +20,7 @@ public class TestGame : Game
|
||||
_renderer.SetTargetFps(60);
|
||||
|
||||
_audioBackend.Initialize();
|
||||
_audioBackend.AddBusEffect<AudioEffectReverb>(new AudioEffectReverb());
|
||||
|
||||
_inputHandler.AddInputMapping("play", new InputAction[] { new KeyInputAction(KeyboardKey.Spacebar) });
|
||||
}
|
||||
@@ -40,9 +41,11 @@ public class TestGame : Game
|
||||
|
||||
if (_inputHandler.IsActionJustPressed("play"))
|
||||
{
|
||||
_audioBackend.PlaySoundVariation(_testSound, default, 0.1f);
|
||||
_audioBackend.PlaySoundVariation(_testSound, "Master", 0.1f);
|
||||
}
|
||||
|
||||
_audioBackend.Update();
|
||||
|
||||
_renderer.SetTransform(new Vector2(640, 480));
|
||||
_renderer.DrawCircle(16f, Color.Chocolate);
|
||||
_renderer.EndFrame();
|
||||
@@ -52,10 +55,11 @@ public class TestGame : Game
|
||||
public override void Shutdown()
|
||||
{
|
||||
_renderer.Shutdown();
|
||||
_audioBackend.Shutdown();
|
||||
}
|
||||
private Renderer _renderer;
|
||||
private SoundLoader _soundLoader;
|
||||
private Sound _testSound;
|
||||
private OpenALAudioBackend _audioBackend;
|
||||
private FmodAudioBackend _audioBackend;
|
||||
private InputHandler _inputHandler;
|
||||
}
|
||||
Reference in New Issue
Block a user