Skip to content

Commit d9df2cb

Browse files
committed
[publish] Bump deps, fix compilation warnings, update TFMs bump to 3.1.0
TFM changes should not be a breaking change - no support should be dropped.
1 parent 9916221 commit d9df2cb

File tree

8 files changed

+29
-26
lines changed

8 files changed

+29
-26
lines changed

.github/workflows/default.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ jobs:
99

1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v6.0.2
1313
- name: Setup .NET Core
14-
uses: actions/setup-dotnet@v1
14+
uses: actions/setup-dotnet@v5.1.0
1515
with:
16-
dotnet-version: 6.x
16+
dotnet-version: 10.x
1717
- name: Install dependencies
1818
run: dotnet restore
1919
- name: Tests
2020
run: dotnet test
2121
- name: Build
2222
run: dotnet build -c Release
2323
- name: Upload NuGet Artifact
24-
uses: actions/upload-artifact@v2
24+
uses: actions/upload-artifact@v6.0.0
2525
with:
2626
name: Fmod5Sharp.nupkg
2727
path: Fmod5Sharp/bin/Release/*.nupkg

BankExtractor/BankExtractor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

Fmod5Sharp.Tests/Fmod5Sharp.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66

77
<IsPackable>false</IsPackable>
@@ -16,18 +16,18 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
20-
<PackageReference Include="NAudio.Core" Version="2.1.0"/>
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
20+
<PackageReference Include="NAudio.Core" Version="2.2.1"/>
2121
<PackageReference Include="NVorbis" Version="0.10.5" />
22-
<PackageReference Include="xunit" Version="2.4.1" />
23-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
22+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
2423
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2524
<PrivateAssets>all</PrivateAssets>
2625
</PackageReference>
27-
<PackageReference Include="coverlet.collector" Version="3.0.2">
26+
<PackageReference Include="coverlet.collector" Version="8.0.0">
2827
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2928
<PrivateAssets>all</PrivateAssets>
3029
</PackageReference>
30+
<PackageReference Include="xunit.v3" Version="3.2.2" />
3131
</ItemGroup>
3232

3333
<ItemGroup>

Fmod5Sharp.Tests/Fmod5SharpVorbisTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void VorbisFilesThatPreviouslyThrewExceptionsDoNot()
7575
CheckSampleCount(sample, oggBytes);
7676
}
7777

78-
private bool CheckSampleCount(FmodSample sample, byte[] oggBytes)
78+
private void CheckSampleCount(FmodSample sample, byte[] oggBytes)
7979
{
8080
Assert.Equal(sample.Metadata.SampleCount, new VorbisReader(new MemoryStream(oggBytes)).TotalSamples);
8181
}

Fmod5Sharp/Fmod5Sharp.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
<IsTrimmable>true</IsTrimmable>
12-
<LangVersion>10</LangVersion>
12+
<LangVersion>11</LangVersion>
1313
<Nullable>enable</Nullable>
1414
<PackageId>Fmod5Sharp</PackageId>
1515
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -19,18 +19,18 @@
1919
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2020
<RepositoryType>git</RepositoryType>
2121
<RepositoryUrl>https://github.com/SamboyCoding/Fmod5Sharp.git</RepositoryUrl>
22-
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
22+
<TargetFrameworks>net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1</TargetFrameworks>
2323
<Title>FMOD5 Sharp</Title>
24-
<Version>3.0.1</Version>
24+
<Version>3.1.0</Version>
2525
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
30-
<PackageReference Include="IndexRange" Version="1.0.2"/>
31-
<PackageReference Include="NAudio.Core" Version="2.1.0"/>
32-
<PackageReference Include="OggVorbisEncoder" Version="1.2.0"/>
33-
<PackageReference Include="System.Text.Json" Version="6.0.5"/>
29+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All" />
30+
<PackageReference Include="IndexRange" Version="1.1.0" />
31+
<PackageReference Include="NAudio.Core" Version="2.2.1" />
32+
<PackageReference Include="OggVorbisEncoder" Version="1.2.2" />
33+
<PackageReference Include="System.Text.Json" Version="10.0.3" />
3434
</ItemGroup>
3535

3636
<ItemGroup>

Fmod5Sharp/FmodTypes/FmodSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public FmodSample(FmodSampleMetadata metadata, byte[] sampleBytes)
1616
SampleBytes = sampleBytes;
1717
}
1818

19-
#if NET6_0
19+
#if NET6_0_OR_GREATER
2020
public bool RebuildAsStandardFileFormat([NotNullWhen(true)] out byte[]? data, [NotNullWhen(true)] out string? fileExtension)
2121
#else
2222
public bool RebuildAsStandardFileFormat(out byte[]? data, out string? fileExtension)

Fmod5Sharp/FsbLoader.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.IO;
43
using Fmod5Sharp.FmodTypes;
54
using Fmod5Sharp.Util;
@@ -49,12 +48,16 @@ public static class FsbLoader
4948

5049
if (i < header.Samples.Count - 1)
5150
{
52-
lastByteOfSample = (long)header.Samples[i + 1].DataOffset;
51+
lastByteOfSample = header.Samples[i + 1].DataOffset;
5352
}
5453

55-
byte[] sampleData = new byte[lastByteOfSample - firstByteOfSample];
54+
var sampleData = new byte[lastByteOfSample - firstByteOfSample];
5655
stream.Position = dataStartOffset + firstByteOfSample;
56+
#if NET8_0_OR_GREATER
57+
stream.ReadExactly(sampleData, 0, sampleData.Length);
58+
#else
5759
stream.Read(sampleData, 0, sampleData.Length);
60+
#endif
5861

5962
var sample = new FmodSample(sampleMetadata, sampleData);
6063

HeaderGenerator/HeaderGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

0 commit comments

Comments
 (0)