Class TSoundFile

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSoundFile = class(TObject)

Description

Hierarchy

  • TObject
  • TSoundFile

Overview

Methods

Protected procedure CheckALExtension(const S: string);
Public constructor CreateFromStream(Stream: TStream); virtual; abstract;
Public class function CreateFromFile(const URL: string): TSoundFile;
Public procedure PrepareOpenAL; virtual;
Public function Data: Pointer; virtual; abstract;
Public function DataSize: LongWord; virtual; abstract;
Public function DataFormat: TALuint; virtual; abstract;
Public function Frequency: LongWord; virtual; abstract;
Public function Duration: TFloatTime;

Description

Methods

Protected procedure CheckALExtension(const S: string);
 
Public constructor CreateFromStream(Stream: TStream); virtual; abstract;

This will load a sound from a stream.

Public class function CreateFromFile(const URL: string): TSoundFile;

Load a sound data, given an URL. This just opens the file as stream and then calls CreateFromStream of appropriate class, so see CreateFromStream for more info. For now, file format (which TSoundFile to use) is decided by the URL extension.

Public procedure PrepareOpenAL; virtual;

Call this on this sound always after OpenAL is initialized and before passing this sound data to OpenAL. This may fix or check some things for this sound, checking e.g. whether some OpenAL extensions are supported.

Exceptions raised
ESoundFormatNotSupportedByOpenAL
if some OpenAL extension required to support this format is not present.
Public function Data: Pointer; virtual; abstract;

Sound data, according to DataFormat. Contents of Data are readonly.

Public function DataSize: LongWord; virtual; abstract;

Bytes allocated for Data.

Public function DataFormat: TALuint; virtual; abstract;

Data format, as understood by OpenAL.

Public function Frequency: LongWord; virtual; abstract;
 
Public function Duration: TFloatTime;

Duration in seconds. Returns -1 if not known (DataSize or Frequency are zero, or DataFormat is unknown).


Generated by PasDoc 0.13.0 on 2014-08-30 12:10:41