From daae1a34b92def2c18dd877dcfb09d17223b099a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 19 Sep 2023 17:14:48 -0700 Subject: [PATCH] fix a few more compile errors --- src/Audio/AudioDataOgg.cs | 6 +++--- src/Audio/AudioDataQoa.cs | 8 ++++---- src/Graphics/Color.cs | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Audio/AudioDataOgg.cs b/src/Audio/AudioDataOgg.cs index d14d7159..3728cc8a 100644 --- a/src/Audio/AudioDataOgg.cs +++ b/src/Audio/AudioDataOgg.cs @@ -25,7 +25,7 @@ namespace MoonWorks.Audio if (error != 0) { - throw new AudioLoadException("Error loading file!"); + throw new InvalidOperationException("Error loading file!"); } var info = FAudio.stb_vorbis_get_info(handle); @@ -77,7 +77,7 @@ namespace MoonWorks.Audio NativeMemory.Free((void*) FileDataPtr); Logger.LogError("Error opening OGG file!"); Logger.LogError("Error: " + error); - throw new AudioLoadException("Error opening OGG file!"); + throw new InvalidOperationException("Error opening OGG file!"); } } } @@ -111,7 +111,7 @@ namespace MoonWorks.Audio if (error != 0) { - throw new AudioLoadException("Error loading file!"); + throw new InvalidOperationException("Error loading file!"); } var info = FAudio.stb_vorbis_get_info(filePointer); var lengthInFloats = diff --git a/src/Audio/AudioDataQoa.cs b/src/Audio/AudioDataQoa.cs index e54a3d2e..2ee075fa 100644 --- a/src/Audio/AudioDataQoa.cs +++ b/src/Audio/AudioDataQoa.cs @@ -31,13 +31,13 @@ namespace MoonWorks.Audio UInt64 fileHeader = ReverseEndianness(reader.ReadUInt64()); if ((fileHeader >> 32) != QOA_MAGIC) { - throw new AudioLoadException("Specified file is not a QOA file."); + throw new InvalidOperationException("Specified file is not a QOA file."); } uint totalSamplesPerChannel = (uint) (fileHeader & (0xFFFFFFFF)); if (totalSamplesPerChannel == 0) { - throw new AudioLoadException("Specified file is not a valid QOA file."); + throw new InvalidOperationException("Specified file is not a valid QOA file."); } UInt64 frameHeader = ReverseEndianness(reader.ReadUInt64()); @@ -86,7 +86,7 @@ namespace MoonWorks.Audio { NativeMemory.Free((void*) FileDataPtr); Logger.LogError("Error opening QOA file!"); - throw new AudioLoadException("Error opening QOA file!"); + throw new InvalidOperationException("Error opening QOA file!"); } } } @@ -127,7 +127,7 @@ namespace MoonWorks.Audio { NativeMemory.Free(fileDataPtr); Logger.LogError("Error opening QOA file!"); - throw new AudioLoadException("Error opening QOA file!"); + throw new InvalidOperationException("Error opening QOA file!"); } FAudio.qoa_attributes(qoaHandle, out var channels, out var samplerate, out var samples_per_channel_per_frame, out var total_samples_per_channel); diff --git a/src/Graphics/Color.cs b/src/Graphics/Color.cs index bf535cf4..e0272fd4 100644 --- a/src/Graphics/Color.cs +++ b/src/Graphics/Color.cs @@ -20,6 +20,7 @@ using System.Diagnostics; using System.Text; using MoonWorks.Math; using MoonWorks.Math.Float; +using MoonWorks.Graphics.PackedVector; #endregion namespace MoonWorks.Graphics