VOOZH about

URL: https://www.nuget.org/packages/NLayer/

⇱ NuGet Gallery | NLayer 1.16.0




NLayer 1.16.0

dotnet add package NLayer --version 1.16.0
 
 
NuGet\Install-Package NLayer -Version 1.16.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NLayer" Version="1.16.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NLayer" Version="1.16.0" />
 
Directory.Packages.props
<PackageReference Include="NLayer" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NLayer --version 1.16.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NLayer, 1.16.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NLayer@1.16.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NLayer&version=1.16.0
 
Install as a Cake Addin
#tool nuget:?package=NLayer&version=1.16.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NLayer

NLayer is a fully managed MP3 to WAV decoder. The code was originally based on JavaLayer (v1.0.1), which has been ported to C#.

Was previously hosted at nlayer.codeplex.com. Please see the history there for full details of contributors.

Usage

To use NLayer for decoding MP3, first reference NLayer.

using NLayer;

Then create an MpegFile, pass a file name or a stream to the constructor, and use ReadSamples for decoding the content:

// samples per second times channel count
const int samplesCount = 44100;
var fileName = "myMp3File.mp3";
var mpegFile = new MpegFile(filename);
float[] samples = new float[samplesCount];
int readCount = mpegFile.ReadSamples(samples, 0, samplesCount);

More information could be found in code documents.

Use with NAudio

NLayer is capable of using in conjunction with NAudio for file conversion and real-time playback.

You need to reference NAudio, NLayer and NLayer.NAudioSupport first.

using NAudio.Wave;
using NLayer.NAudioSupport;

Then create an Mp3FileReader, passing in a FrameDecompressorBuilder that uses the Mp3FrameDecompressor from NLayer.NAudioSupport:

var fileName = "myMp3File.mp3";
var builder = new Mp3FileReader.FrameDecompressorBuilder(wf => new Mp3FrameDecompressor(wf));
var reader = new Mp3FileReaderBase(fileName, builder);
// play or process the file, e.g.:
waveOut.Init(reader);
waveOut.Play();
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp1.0 netcoreapp1.0 was computed.  netcoreapp1.1 netcoreapp1.1 was computed.  netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 netstandard1.3 is compatible.  netstandard1.4 netstandard1.4 was computed.  netstandard1.5 netstandard1.5 was computed.  netstandard1.6 netstandard1.6 was computed.  netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net46 net46 was computed.  net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen30 tizen30 was computed.  tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Universal Windows Platform uap uap was computed.  uap10.0 uap10.0 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on NLayer:

Package Downloads
NLayer.NAudioSupport

NAudio support for NLayer

HPD-Agent.Framework

A middleware-driven agentic AI framework built on Microsoft.Extensions.AI for building intelligent, tool-using agents.

YellowDogMan.CSCoreFork

Fork of CSCore by filoe

Aural

A cross-platform audio playback library for WAV, OGG, and MP3 formats with real-time audio filters (low-pass, high-pass, reverb, pitch shift). Play audio with a single line of code

Blitter

Blitter - a .NET graphics library. Class wrappers around SDL3 for graphics, input, audio, and more. Bundles the core Blitter library, SkiaSharp-powered image loading and Skia rendering helpers, and the Blitter.Blocks2D / Blitter.Blocks3D scene layers.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on NLayer:

Repository Stars
ValveResourceFormat/ValveResourceFormat
Source 2 Viewer is an all-in-one tool to browse VPK archives, view, extract, and decompile Source 2 assets, including maps, models, materials, textures, sounds, and more.
Pyrdacor/Ambermoon.net
Ambermoon rewrite in C#
leezer3/OpenBVE
OpenBVE- A free train simulator
bernatvadell/muonline
zhongkaifu/TensorSharp
A C# inference engine for running large language models (LLMs) locally using GGUF model files. TensorSharp provides a console application, a web-based chatbot interface, and Ollama/OpenAI-compatible HTTP APIs for programmatic access. It supports Windows/MacOS/Linux with full GPU capability
Version Downloads Last Updated
1.16.0 82,261 10/8/2024
1.15.0 323,327 12/18/2023
1.14.0 189,109 9/7/2021
1.13.0 33,432 3/9/2020
1.12.0 104,865 6/19/2017
1.11.0 19,142 2/4/2017