FLACSharp 1.0.0
dotnet add package FLACSharp --version 1.0.0
NuGet\Install-Package FLACSharp -Version 1.0.0
<PackageReference Include="FLACSharp" Version="1.0.0" />
<PackageVersion Include="FLACSharp" Version="1.0.0" />
<PackageReference Include="FLACSharp" />
paket add FLACSharp --version 1.0.0
#r "nuget: FLACSharp, 1.0.0"
#:package FLACSharp@1.0.0
#addin nuget:?package=FLACSharp&version=1.0.0
#tool nuget:?package=FLACSharp&version=1.0.0
FLACSharp
This is a simple, low-level binding to FLAC.dll / libFLAC.so from C# using Platform Invoke.
In order to use it, a platform-appropriate copy of the native FLAC library (FLAC.dll on Windows, libFLAC.so on Linux / FreeBSD / OS X) will need to be in the loader path or current directory.
Using
To use this library, add a NuGet package reference to FLACSharp. Then, call FLAC library methods as you would from a C/C++ project via the libFLAC.NativeMethods class.
The metadata structures make heavy use of unions, which aren't terribly well-supported by Platform Invoke.
Reading: The marshalling of metadata structures using the
StreamMetadataclass will decode the union bytes into all possible interpretations (the members ofStreamMetadata.Data). Use the one appropriate to theType.Writing: Separate classes matching the layout specific to each type are provided. Use the appropriate type, e.g.
StreamMetadata_with_StreamInfo,StreamMetadata_with_Application. A helper thunk is provided that allows you to supply aStreamMetadata[]toFLAC__stream_encoder_set_metadataand have the data be marshalled polymorphically.
Samples
Some simple proof-of-concept sample applications can be found in the Samples subdirectory of the library's source code repository (see below).
Completeness
As of this writing, this library is thrown together extremely hastily in one afternoon. It has been observed to successfully encode and decode FLAC data, but it has not been extensively tested and not all FLAC features have been exercised. If you want to use a feature and it doesn't work properly, open up a Git Issue, or, if you're up for it, code up a fix and make a Pull Request.
Source Code
The repository for this library's source code is found at:
License
The library is provided under the MIT Open Source license. See LICENSE.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
-
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 | 159 | 7/15/2025 |