From 52159b93f4ac750bf04e1e9b1fc19d5e151f21f4 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Mon, 24 Jun 2024 03:59:02 -0400 Subject: [PATCH] small bug fix --- .gitignore | 4 +++- BRRSample.cs | 4 +--- BRRSuite.csproj | 4 ++-- Conversion.cs | 2 +- README.md | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 2b9e6b8..7c71a53 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ obj/* .vs/* */.vs/* *.user -*/Setup/* \ No newline at end of file +*/Setup/* +publish.bat +nuget.config \ No newline at end of file diff --git a/BRRSample.cs b/BRRSample.cs index 7d6071e..b1a44aa 100644 --- a/BRRSample.cs +++ b/BRRSample.cs @@ -29,7 +29,7 @@ public string InstrumentName { // sanitize to ascii value = string.Concat(value.Where(c => char.IsAscii(c) && !char.IsControl(c))); - // encforce length + // enforce length _name = value.Length switch { SuiteSample.InstrumentNameLength => value, < SuiteSample.InstrumentNameLength => value.PadRight(SuiteSample.InstrumentNameLength, SuiteSample.InstrumentNamePadChar), @@ -400,7 +400,6 @@ public static bool VerifySuiteSample(byte[] data, out string? message) { return false; } - if ((data[^BrrBlockSize] & EndFlag) is 0) { message = $"The sample data does not contain an end flag on the final block header."; return false; @@ -437,7 +436,6 @@ ushort ReadShort(int i) { } - /// /// Exports this sample's data to a BRR Suite Sample file. /// The extension of the exported file will be added or changed to the preferred extension defined by . diff --git a/BRRSuite.csproj b/BRRSuite.csproj index 551dec1..c91103f 100644 --- a/BRRSuite.csproj +++ b/BRRSuite.csproj @@ -12,8 +12,8 @@ README.md git False - 1.0.0 - 1.0.0 + 1.0.1 + 1.0.1 LICENSE True False diff --git a/Conversion.cs b/Conversion.cs index ffca0c2..63d8af1 100644 --- a/Conversion.cs +++ b/Conversion.cs @@ -312,7 +312,7 @@ public static BRRSample Encode(int[] wavSamples, EncodingAlgorithm encoder, Resa samples = filt(samples); - if (samples.Length != samplesLength) { + if (samples.Length != targetLength) { throw new BRRConversionException("Something is wrong with a filter that changed the size of the sample data."); } }); diff --git a/README.md b/README.md index f18a7fe..eb2f160 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BRR Suite -This is a C# library for converting modern, uncompressed audio files to the bit-rate reduction format (BRR) used by the Super Nintendo Entertainment System. For a user-friendly GUI employing this library, see my [BRR Suite GUI repository](https://github.com/spannerisms/BRRSuiteGUI) +This is a C# library for converting modern, uncompressed audio files to the bit-rate reduction format (BRR) used by the Super Nintendo Entertainment System. For a user-friendly GUI employing this library, see my [BRR Suite GUI repository](https://github.com/spannerisms/BRRSuiteGUI). # Acknowledgements * kan/spannerisms - me, the library author