From 8c8fcde3bc3b90f9cd0317b3fdba2b36beedc168 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 20 Jan 2021 12:43:48 -0800 Subject: [PATCH] audio API update --- lib/MoonWorks | 2 +- src/TestGame.cs | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/MoonWorks b/lib/MoonWorks index ec09a59..52b60b6 160000 --- a/lib/MoonWorks +++ b/lib/MoonWorks @@ -1 +1 @@ -Subproject commit ec09a5952b4b9aa16a3cf57eae34a293f4a47dac +Subproject commit 52b60b66f43e8b20192b5cc04211a0f2a183c87d diff --git a/src/TestGame.cs b/src/TestGame.cs index 24f6674..55b4826 100644 --- a/src/TestGame.cs +++ b/src/TestGame.cs @@ -38,6 +38,7 @@ namespace MoonWorksTest StaticSound music; StaticSoundInstance musicInstance; + StreamingSoundOgg musicStream; public TestGame(WindowCreateInfo windowCreateInfo, PresentMode presentMode, int targetTimestep = 60, bool debugMode = false) : base(windowCreateInfo, presentMode, targetTimestep, debugMode) { @@ -255,16 +256,13 @@ namespace MoonWorksTest screenshotBuffer = new Buffer(GraphicsDevice, 0, screenShotBufferSize); screenshotThread = new Thread(new ThreadStart(SaveScreenshot)); + // music = new DynamicSound(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); music = StaticSound.LoadOgg(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); musicInstance = music.CreateInstance(); - musicInstance.Pitch = -0.7f; - musicInstance.Pan = 0; - musicInstance.Reverb = 2f; - musicInstance.Play(); + // musicInstance.Play(); - //music = new DynamicSound(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); - //musicInstance = music.CreateInstance(); - //musicInstance.Play(); + musicStream = StreamingSoundOgg.Load(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg")), false, true); + musicStream.Play(); } protected override void Update(double dt)