Table of Contents

Class AlsaException

Namespace
NAudio.Wave.Alsa
Assembly
NAudio.Alsa.dll

Exception thrown when an ALSA (libasound) call returns an error.

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

Constructors

AlsaException(int)

Creates a new AlsaException from an ALSA error code.

public AlsaException(int errorCode)

Parameters

errorCode int

The negative error code returned by libasound.

AlsaException(int, string)

Creates a new AlsaException from an ALSA error code, prefixed with the name of the failing call.

public AlsaException(int errorCode, string function)

Parameters

errorCode int

The negative error code returned by libasound.

function string

The libasound function that failed.

Properties

ErrorCode

The raw ALSA error code (a negative errno-style value).

public int ErrorCode { get; }

Property Value

int

Function

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

public string Function { get; }

Property Value

string

Methods

ThrowIfError(int, string)

Throws an AlsaException if errorCode indicates failure (a negative value).

public static void ThrowIfError(int errorCode, string function)

Parameters

errorCode int

The result of a libasound call.

function string

The libasound function that produced it.