Language
Edit

AudioContext Class

Definition

Provides methods to instantiate, use and destroy an audio context for playback. Static methods are provided to list available devices known by the driver.

public sealed class AudioContext : IDisposable
type AudioContext = class
    interface IDisposable
Inheritance
AudioContext
Implements

Constructors

Name Description
AudioContext()

Runs before the actual class constructor, to load available devices.

AudioContext(String, Int32, Int32, Boolean, Boolean, AudioContext+MaxAuxiliarySends)
AudioContext(String, Int32, Int32, Boolean, Boolean)

Creates the audio context using the specified device and device parameters.

AudioContext(String, Int32, Int32, Boolean)

Constructs a new AudioContext, using the specified audio device and device parameters.

AudioContext(String, Int32, Int32)

Constructs a new AudioContext, using the specified audio device and device parameters.

AudioContext(String, Int32)

Constructs a new AudioContext, using the specified audio device and device parameters.

AudioContext(String)

Constructs a new AudioContext instance.

Properties

Name Description
AvailableDevices

Returns a list of strings containing all known playback devices.

CurrentContext

Gets the OpenTK.Audio.AudioContext which is current in the application.

CurrentDevice

Gets a System.String with the name of the device used in this context.

CurrentError

Returns the ALC error code for this instance.

DefaultDevice

Returns the name of the device that will be used as playback default.

IsProcessing

Gets a System.Boolean indicating whether the AudioContext is currently processing audio events.

IsSynchronized

Gets a System.Boolean indicating whether the AudioContext is synchronized.

Methods

Name Description
CheckErrors()

Checks for ALC error conditions.

Dispose()

Disposes of the AudioContext, cleaning up all resources consumed by it.

Equals(Object)

Compares this instance with another.

Finalize()

Finalizes this instance.

GetHashCode()

Calculates the hash code for this instance.

MakeCurrent()

Makes the AudioContext current in the calling thread.

Process()

Processes queued audio events.

SupportsExtension(String)

Checks whether the specified OpenAL extension is supported.

Suspend()

Suspends processing of audio events.

ToString()

Returns a T:System.String that desrcibes this instance.

Applies to