Skip to content

TSdlAudioDriver

Audio driver.

Definition

Unit: Neslib.Sdl3.Audio

type TSdlAudioDriver = record ... end;

Properties

Name Description
Current The current audio driver, or nil if no driver has been initialized.
DriverCount The number of built-in audio drivers.
Drivers The name built in audio drivers.
Name The name of the driver.

Operators

Name Description
Equal(TSdlAudioDriver, TSdlAudioDriver) Used to compare against another TSdlAudioDriver.
Equal(TSdlAudioDriver, Pointer) Used to compare against nil.
Implicit Used to set the value to nil.
NotEqual(TSdlAudioDriver, TSdlAudioDriver) Used to compare against another TSdlAudioDriver.
NotEqual(TSdlAudioDriver, Pointer) Used to compare against nil.

Property Descriptions

Current

The current audio driver, or nil if no driver has been initialized.

class property Current: TSdlAudioDriver read GetCurrent

Type: TSdlAudioDriver

Remarks

It is safe to use this property from any thread


DriverCount

The number of built-in audio drivers.

This property returns a hardcoded number. This never returns a negative value; if there are no drivers compiled into this build of SDL, this property returns zero. The presence of a driver in this list does not mean it will function, it just means SDL is capable of interacting with that interface. For example, a build of SDL might have esound support, but if there's no esound server available, SDL's esound driver would fail if used.

By default, SDL tries all drivers, in its preferred order, until one is found to be usable.

class property DriverCount: Integer read GetDriverCount

Type: Integer

See Also

Remarks

It is safe to use this property from any thread


Drivers

The name built in audio drivers.

The list of audio drivers is given in the order that they are normally initialized by default; the drivers that seem more reasonable to choose first (as far as the SDL developers believe) are earlier in the list.

class property Drivers[const AIndex: Integer]: TSdlAudioDriver read GetDriver

Type: TSdlAudioDriver

See Also

Remarks

It is safe to use this property from any thread


Name

The name of the driver.

The names of drivers are all simple, low-ASCII identifiers, like "alsa", "coreaudio" or "wasapi". These never have Unicode characters, and are not meant to be proper names.

property Name: String read FName

Type: String


Operator Descriptions

Equal(TSdlAudioDriver, TSdlAudioDriver)

Used to compare against another TSdlAudioDriver.

class operator Equal(const ALeft, ARight: TSdlAudioDriver): Boolean; inline; static

Parameters

ALeft: TSdlAudioDriver

ARight: TSdlAudioDriver

Returns

Boolean


Equal(TSdlAudioDriver, Pointer)

Used to compare against nil.

class operator Equal(const ALeft: TSdlAudioDriver; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSdlAudioDriver

ARight: Pointer

Returns

Boolean


Implicit(Pointer)

Used to set the value to nil.

class operator Implicit(const AValue: Pointer): TSdlAudioDriver; inline; static

Parameters

AValue: Pointer

Returns

TSdlAudioDriver


NotEqual(TSdlAudioDriver, TSdlAudioDriver)

Used to compare against another TSdlAudioDriver.

class operator NotEqual(const ALeft, ARight: TSdlAudioDriver): Boolean; inline; static

Parameters

ALeft: TSdlAudioDriver

ARight: TSdlAudioDriver

Returns

Boolean


NotEqual(TSdlAudioDriver, Pointer)

Used to compare against nil.

class operator NotEqual(const ALeft: TSdlAudioDriver; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSdlAudioDriver

ARight: Pointer

Returns

Boolean