Skip to content

TSdlAudioSpec

Format specifier for audio data.

Definition

Unit: Neslib.Sdl3.Audio

type TSdlAudioSpec = record ... end;

See Also

Properties

Name Description
Format Audio data format
FrameSize Calculate the size of each audio frame (in bytes).
Freq Sample rate: sample frames per second
NumChannels Number of channels: 1 mono, 2 stereo, etc

Constructors

Name Description
Create Creates a new audion format specification.

Property Descriptions

Format

Audio data format

property Format: TSdlAudioFormat read GetFormat write SetFormat

Type: TSdlAudioFormat


FrameSize

Calculate the size of each audio frame (in bytes).

This reports on the size of an audio sample frame: stereo Int16 data (2 channels of 2 bytes each) would be 4 bytes per frame, for example.

property FrameSize: Integer read GetFrameSize

Type: Integer


Freq

Sample rate: sample frames per second

property Freq: Integer read FHandle.freq write FHandle.freq

Type: Integer


NumChannels

Number of channels: 1 mono, 2 stereo, etc

property NumChannels: Integer read FHandle.channels write FHandle.channels

Type: Integer


Constructor Descriptions

Create

Creates a new audion format specification.

constructor Create(const AFormat: TSdlAudioFormat; const ANumChannels, AFreq: Integer)

Parameters

AFormat: TSdlAudioFormat : Audio data format.

ANumChannels: Integer : Number of channels: 1 mono, 2 stereo, etc.

AFreq: Integer : Sample rate: sample frames per second.