Table of Contents

Class SoundFileException

Namespace
NAudio.SoundFile
Assembly
NAudio.SoundFile.dll

Exception thrown when a libsndfile call fails.

public class SoundFileException : Exception, ISerializable
Inheritance
SoundFileException
Implements
Inherited Members

Constructors

SoundFileException(int, string, string)

Creates a new SoundFileException from a message and error code, prefixed with the name of the failing call.

public SoundFileException(int errorCode, string function, string message)

Parameters

errorCode int

The libsndfile error number, or 0 when not available.

function string

The libsndfile function that failed.

message string

The libsndfile error string.

SoundFileException(string, int)

Creates a new SoundFileException with a message and the libsndfile error code that produced it.

public SoundFileException(string message, int errorCode)

Parameters

message string

The libsndfile error string.

errorCode int

The libsndfile error number, or 0 when not available.

SoundFileException(string, int, Exception)

Creates a new SoundFileException wrapping an underlying failure (e.g. a backing-stream I/O exception that could not propagate through the native callback boundary).

public SoundFileException(string message, int errorCode, Exception innerException)

Parameters

message string

Description of the failure.

errorCode int

The libsndfile error number, or 0.

innerException Exception

The original exception.

Properties

ErrorCode

The raw libsndfile error number (sf_error), or 0 when not available (for example when sf_open returned NULL).

public int ErrorCode { get; }

Property Value

int

Function

The libsndfile function that failed, or null when not supplied.

public string Function { get; }

Property Value

string