SpeexResamplerSharp 1.0.0
dotnet add package SpeexResamplerSharp --version 1.0.0
NuGet\Install-Package SpeexResamplerSharp -Version 1.0.0
<PackageReference Include="SpeexResamplerSharp" Version="1.0.0" />
<PackageVersion Include="SpeexResamplerSharp" Version="1.0.0" />
<PackageReference Include="SpeexResamplerSharp" />
paket add SpeexResamplerSharp --version 1.0.0
#r "nuget: SpeexResamplerSharp, 1.0.0"
#:package SpeexResamplerSharp@1.0.0
#addin nuget:?package=SpeexResamplerSharp&version=1.0.0
#tool nuget:?package=SpeexResamplerSharp&version=1.0.0
SpeexResamplerSharp
SpeexResamplerSharp is an optimized, pure-managed C# port of the SpeexDSP audio resampler. It targets
netstandard2.1, net8.0, and net10.0 and preserves the floating-point SSE/SSE2 implementation's output bit for bit
on x64.
The library supports floating-point and signed 16-bit PCM, independent or interleaved channels, integer and rational rate changes, all Speex quality levels, streaming history, non-unit strides, latency queries, initial-delay skipping, reset, and explicit zero-input draining.
Example
using SpeexResamplerSharp;
var resampler = new SpeexResampler(channelCount: 2, inputRate: 48_000, outputRate: 44_100,
quality: ResamplerQuality.Desktop);
short[] input = GetInterleavedStereoPcm();
short[] output = new short[44_100 * 2];
ResamplerProcessResult progress = resampler.ProcessInterleaved(input, output);
Console.WriteLine($"Consumed {progress.InputConsumed} frames; produced {progress.OutputProduced} frames.");
Processing methods do not allocate after warm-up. A resampler is mutable and not thread-safe; use a separate instance for each concurrently processed stream.
The netstandard2.1 build uses an unsafe four-lane scalar-vector kernel that preserves the upstream SSE operation
order. The net8.0 and net10.0 builds use explicit SSE/SSE2 intrinsics when the processor supports them and fall back
to the portable bit-compatible kernel otherwise. Filter and history arrays are retained across calls and only grow when
a rate or quality change requires more capacity.
Verification
The test suite builds the pinned speexdsp submodule as a strict floating-point SSE/SSE2 native reference and compares
every managed output bit, progress count, and state transition. Tests also use a checked-in CC0 real-music excerpt; see
THIRD_PARTY_NOTICES.md and the asset provenance for details.
Build before running tests so no stale binaries are exercised:
dotnet build SpeexResamplerSharp.sln -c Release -m:1
dotnet test --solution SpeexResamplerSharp.sln -c Release --no-build --max-parallel-test-modules 1 `
--minimum-expected-tests 104
Run the real-music performance workloads separately for each runtime:
dotnet run --project SpeexResamplerSharp.Benchmarks -c Release -f net8.0 -- --filter "*" --job short
dotnet run --project SpeexResamplerSharp.Benchmarks -c Release -f net10.0 -- --filter "*" --job short
License
BSD 3-Clause. See LICENSE and THIRD_PARTY_NOTICES.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 100 | 8/17/2026 |