Skip to content

Commit

Permalink
small bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spannerisms committed Jun 24, 2024
1 parent 9b48e92 commit 52159b9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ obj/*
.vs/*
*/.vs/*
*.user
*/Setup/*
*/Setup/*
publish.bat
nuget.config
4 changes: 1 addition & 3 deletions BRRSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -437,7 +436,6 @@ ushort ReadShort(int i) {

}


/// <summary>
/// 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 <see cref="SuiteSample.Extension"/>.
Expand Down
4 changes: 2 additions & 2 deletions BRRSuite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryType>git</RepositoryType>
<SignAssembly>False</SignAssembly>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
<AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.1</FileVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<EnableNETAnalyzers>False</EnableNETAnalyzers>
Expand Down
2 changes: 1 addition & 1 deletion Conversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
});
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 52159b9

Please sign in to comment.