audio API update

main
cosmonaut 2021-01-20 12:43:48 -08:00
parent f13e12010c
commit 8c8fcde3bc
2 changed files with 6 additions and 8 deletions

@ -1 +1 @@
Subproject commit ec09a5952b4b9aa16a3cf57eae34a293f4a47dac Subproject commit 52b60b66f43e8b20192b5cc04211a0f2a183c87d

View File

@ -38,6 +38,7 @@ namespace MoonWorksTest
StaticSound music; StaticSound music;
StaticSoundInstance musicInstance; StaticSoundInstance musicInstance;
StreamingSoundOgg musicStream;
public TestGame(WindowCreateInfo windowCreateInfo, PresentMode presentMode, int targetTimestep = 60, bool debugMode = false) : base(windowCreateInfo, presentMode, targetTimestep, debugMode) 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); screenshotBuffer = new Buffer(GraphicsDevice, 0, screenShotBufferSize);
screenshotThread = new Thread(new ThreadStart(SaveScreenshot)); 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"))); music = StaticSound.LoadOgg(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg")));
musicInstance = music.CreateInstance(); musicInstance = music.CreateInstance();
musicInstance.Pitch = -0.7f; // musicInstance.Play();
musicInstance.Pan = 0;
musicInstance.Reverb = 2f;
musicInstance.Play();
//music = new DynamicSound(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg"))); musicStream = StreamingSoundOgg.Load(AudioDevice, new FileInfo(Path.Combine("Content", "title_screen.ogg")), false, true);
//musicInstance = music.CreateInstance(); musicStream.Play();
//musicInstance.Play();
} }
protected override void Update(double dt) protected override void Update(double dt)