Class TSoundBuffer

Unit

Declaration

type TSoundBuffer = class(TObject)

Description

Sound buffer represents contents of a sound file, like Wav or OggVorbis, that (may be) played.

It can be only allocated by TSoundEngine.LoadBuffer and freed by TSoundEngine.FreeBuffer. Do not create or free TSoundBuffer instances yourself.

Hierarchy

  • TObject
  • TSoundBuffer

Overview

Methods

Public constructor Create(const SoundEngineBackend: TSoundEngineBackend; const SoundLoading: TSoundLoading);
Public destructor Destroy; override;
Public function Duration: TFloatTime;
Public function DataFormat: TSoundDataFormat;
Public function Frequency: LongWord;

Properties

Public property URL: string read FURL;

Description

Methods

Public constructor Create(const SoundEngineBackend: TSoundEngineBackend; const SoundLoading: TSoundLoading);
 
Public destructor Destroy; override;
 
Public function Duration: TFloatTime;

Duration of the sound, in seconds. -1 if not loaded yet.

Public function DataFormat: TSoundDataFormat;

Data format (bits per sample, stereo or mono) of the loaded sound file. Typical applications don't need this value, this is just an information about the loaded sound file. Undefined if backend is not loaded.

Public function Frequency: LongWord;

Frequency (sample rate) of the loaded sound file. Typical applications don't need this value, this is just an information about the loaded sound file. Undefined if backend is not loaded.

Properties

Public property URL: string read FURL;

Absolute sound file URL. Never empty (do not create TSoundBuffer instances for invalid / empty URL, like the ones that can be created by TRepoSoundEngine for not defined sounds.)


Generated by PasDoc 0.15.0.