A Cross-Platform Audio Library for .NET 8.
- Fast Digital Signal Processing
- Abstraction Layer for Audio I/O
Name (Backend) | Author (Backend) | License (Binding) | Windows10 Desktop | Windows10 UWP | Android | Linux | iOS | Mac OSX |
---|---|---|---|---|---|---|---|---|
OpenTK (OpenAL) | OpenTK | MIT License | ✅ | ❓ | ❓ | ❓ | ❓ | ❓ |
AudioGraph on .NET 5 or later |
Microsoft | MIT License | ✅ | ❎ | ❎ | ❎ | ❎ | ❎ |
NAudio (WaveOut, ASIO, DirectSound, WASAPI) | NAudio | MIT License | ✅ | ❓ | ❎ | ❎ | ❎ | ❎ |
Xamarin.Android (AudioTrack) | Xamarin | MIT License | ❎ | ❎ | ✅ | ❎ | ❎ | ❎ |
❓: Not Tested or needs more information
✅: Tested
❎: Impossible
- Utilizes
System.Numerics.Vectors
andSystem.Runtime.Intrinsics
for resampling calculation. - Uses Direct/Wrapped caching for Catmull-Rom spline coefficients.
Benchmarks on .Net 5, Intel Core i7 4790
- Utilizes
System.Runtime.Intrinsics.X86.Avx
andSystem.Runtime.Intrinsics.X86.Avx2
for FFT calculation. - Forward transformation rescales result by 1/N.
- The memory consumption is O(N) even though the FFT is done in-place.
- Does not need initialization for certain fixed size by default.
- Fixed-size variant is also implemented and is slightly faster.
- It requires that the size of the data be a power of two. Otherwise, the data will be implicitly resized to the size of the largest power of two less than the original size.
To\From | IEEE 754 Binary32(float) |
32bit Linear PCM(Q0.31) |
24bit Linear PCM(Q0.23) |
16bit Linear PCM(Q0.15) |
8bit LPCM (Excess-128) |
G.711 μ−Law |
G.711 A-Law |
---|---|---|---|---|---|---|---|
IEEE 754 Binary32(float) |
✖️ | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ |
32bit Linear PCM(Q0.31) |
✅* | ✖️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
24bit Linear PCM(Q0.23) |
✅* | ☑️* | ✖️ | ☑️ | ☑️ | ☑️ | ☑️ |
16bit Linear PCM(Q0.15) |
✅* | ☑️* | ☑️* | ✖️ | ☑️ | ☑️ | ☑️ |
8bit LPCM (Excess-128) |
✅* | ☑️* | ☑️* | ☑️* | ✖️ | ☑️* | ☑️* |
G.711 μ−Law | ✅* | ☑️* | ☑️* | ☑️* | ☑️* | ✖️ | ☑️* |
G.711 A-Law | ✅* | ☑️* | ☑️* | ☑️* | ☑️* | ☑️* | ✖️ |
Legends:
✅: Shamisen has optimized implementation of direct conversion.
☑️: Shamisen can handle conversion by 2 or more converter. Can be partially optimized. Depending on the combination, noise due to quantization error may occur.
✔: Shamisen has simple implementation of direct conversion.
⭕: Shamisen can handle conversion by 2 or more converter. Both converter is implemented in simple way. Depending on the combination, noise due to quantization error may occur.
❎: Shamisen has no support for conversion.
✖️: No conversion needed(same format).
* : Such conversion can cause noise due to quantization errors.
- Uses
Vector2
andVector3
for filter calculations in each channels. - Unrolls channel loop for Monaural and <5ch filter calculation.
- For some special cases, it utilizes SSEx.x and AVX(2) intrinsics for the calculation.
FastFill
for some types that fills quickly usingVector<T>
.
Container Name | Typical File Extensions | Implemented Codec | Library contains Decoder/Encoder | License | Decoding | Encoding |
---|---|---|---|---|---|---|
Waveform RF64 |
.wav |
Linear PCM, IEEE 754 Floating-Point PCM, A-Law, μ-law | Shamisen | MIT License | ✅ | ✅ (RF64 as default) |
FLAC | .flac |
FLAC | Shamisen.Codecs.Flac | MIT License | ✅ | ❎(Planned) |
Legends:
✅: Supported by Shamisen itself
✔: Supported by another library and its wrapper for Shamisen
❎: Not supported by Shamisen without any custom integration
- Any formats supported by platform-dependent binding libraries
- Currently, Unity IS NOT SUPPORTED AT ALL!
- Requires DivideSharp for frequently appearing divide-by-number-of-channels operations.
- The most processing in this library fully depends on SINGLE core.
- Because
Span<T>
does not support multi-thread processing at all.
- Because
✅: Possible
❓: Needs more information
❎: Impossible
Name of Backend | Author of Backend | License (binding) | Target Platform | Status |
---|---|---|---|---|
Oboe | MIT License | Android >10 | Planned |
✅: Possible
❓: Needs more information
❎: Impossible
Name of Backend | Author of Backend | License (binding) | Target Platforms | Status |
---|---|---|---|---|
Silk.NET OpenAL | .NET Foundation Silk.NET Team | MIT License | Cross Platform(OpenAL) | Gathering Information |
Silk.NET XAudio | .NET Foundation Silk.NET Team | MIT License | Windows-Like(XAudio) | Planned |
Xamarin.iOS | Microsoft | MIT License | iOS | Planned |
✅: Shamisen will have Managed Implementation of decoder/encoder itself
⭕: Shamisen will have Managed Wrapper for another library
❎: Not included in plan currently
Container Name | Typical File Extensions | Target Codec | Planned Library containing Decoder/Encoder | Planned Library License | Decoding | Encoding | Status |
---|---|---|---|---|---|---|---|
FLAC | .flac |
FLAC | Shamisen.Codecs.Flac | MIT License | ✅ | ✅ | Implemented Decoder |
Opus | .opus |
Opus | Shamisen.Codecs.Opus | MIT License | ✅ | ✅ | Planned |
Ogg | .ogg |
Vorbis | Shamisen.Codecs.Ogg | MIT License | ⭕ | ⭕ | Planned |