From 52b60b66f43e8b20192b5cc04211a0f2a183c87d Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 20 Jan 2021 12:42:36 -0800 Subject: [PATCH] whoops that shouldn't be in there --- src/Audio/SongOgg.cs | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/Audio/SongOgg.cs diff --git a/src/Audio/SongOgg.cs b/src/Audio/SongOgg.cs deleted file mode 100644 index 387e8a2c..00000000 --- a/src/Audio/SongOgg.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.IO; - -namespace MoonWorks.Audio -{ - // for streaming long playback - public class Song - { - public IntPtr Handle { get; } - public FAudio.stb_vorbis_info Info { get; } - public uint BufferSize { get; } - public bool Loop { get; set; } - private readonly float[] buffer; - private const int bufferShrinkFactor = 8; - - public TimeSpan Duration { get; set; } - - public Song(FileInfo fileInfo) - { - var filePointer = FAudio.stb_vorbis_open_filename(fileInfo.FullName, out var error, IntPtr.Zero); - - if (error != 0) - { - throw new AudioLoadException("Error loading file!"); - } - - Info = FAudio.stb_vorbis_get_info(filePointer); - BufferSize = (uint)(Info.sample_rate * Info.channels) / bufferShrinkFactor; - - buffer = new float[BufferSize]; - - - FAudio.stb_vorbis_close(filePointer); - } - } -}