Table of Contents

Class SoundFileCapabilities

Namespace
NAudio.SoundFile
Assembly
NAudio.SoundFile.dll

Queries which formats the system libsndfile was built with. FLAC, Vorbis, Opus and MP3 are optional libsndfile build features, so a given install may not support them — check before encoding.

public static class SoundFileCapabilities
Inheritance
SoundFileCapabilities
Inherited Members

Properties

LibraryVersion

The version string of the loaded libsndfile (e.g. "libsndfile-1.2.2") — useful for diagnostics, since codec availability is build-dependent.

public static string LibraryVersion { get; }

Property Value

string

Methods

GetSupportedMajorFormats()

Lists every major (container) format the installed libsndfile build supports.

public static IReadOnlyList<SoundFileFormatInfo> GetSupportedMajorFormats()

Returns

IReadOnlyList<SoundFileFormatInfo>

The supported container formats.

IsFormatSupported(SoundFileMajorFormat, SoundFileSubtype)

Whether the libsndfile build can write the given format/subtype combination (uses sf_format_check at 48 kHz stereo).

public static bool IsFormatSupported(SoundFileMajorFormat major, SoundFileSubtype subtype = SoundFileSubtype.Default)

Parameters

major SoundFileMajorFormat

The container / codec.

subtype SoundFileSubtype

The sample encoding, or Default.

Returns

bool

true if the combination is supported.