Class TPHXAudioEngine

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPHXAudioEngine = class(TObject)

Description

The audio engine is used to play audio using a audio provider

Hierarchy

  • TObject
  • TPHXAudioEngine

Overview

Methods

Public constructor Create; overload;
Public constructor Create(AProvider: TPHXAudioProvider); overload;
Public destructor Destroy; override;
Public procedure Initialize; overload;
Public procedure Initialize(const Device: TPHXSoundDevice); overload;
Public procedure Initialize(const DeviceIndex: Integer); overload;
Public procedure Initialize(const DeviceName: string); overload;
Public function LoadSample(const FileName: String): TPHXAudioSample; overload;
Public function LoadSample(const FileName: String; const Name: String): TPHXAudioSample; overload;
Public function LoadStream(const FileName: String): TPHXAudioStream; overload;
Public function LoadStream(const FileName: String; const Name: String): TPHXAudioStream; overload;
Public procedure Update;
Public procedure Play(const Sample: String); overload;
Public procedure Play(const Sample: String; const Volume: Single); overload;
Public procedure Stop;
Public procedure Pause;
Public procedure Resume;

Properties

Public property Devices: TPHXSoundDeviceList read FDevices;
Public property Samples: TPHXAudioSamples read FSamples;
Public property Streams: TPHXAudioStreams read FStreams;
Public property Volume: Double read GetVolume write SetVolume;
Public property Device: IPHXAudioDevice read FDevice;

Description

Methods

Public constructor Create; overload;

Create the audio engine using the default provicer

Public constructor Create(AProvider: TPHXAudioProvider); overload;

Create the audio engine using a custom provider

Public destructor Destroy; override;

Free the audio engine

Public procedure Initialize; overload;

Initialize the audio engine using the default device

Public procedure Initialize(const Device: TPHXSoundDevice); overload;

Initialize the audio engine using a provided device

Public procedure Initialize(const DeviceIndex: Integer); overload;

Initialize the audio engine using the device at a given index

Public procedure Initialize(const DeviceName: string); overload;

Initialize the audio engine using a device by name

Public function LoadSample(const FileName: String): TPHXAudioSample; overload;

Load a audio sample

Public function LoadSample(const FileName: String; const Name: String): TPHXAudioSample; overload;

Load a audio sample and rename it

Public function LoadStream(const FileName: String): TPHXAudioStream; overload;

Load a audio stream

Public function LoadStream(const FileName: String; const Name: String): TPHXAudioStream; overload;

Load a audio stream and rename it

Public procedure Update;

Update the audio engine

Public procedure Play(const Sample: String); overload;

Play a audio sample by name

Public procedure Play(const Sample: String; const Volume: Single); overload;

Play a audio sample by name with a volume from 0.0 (silent) to 1.0 (full)

Public procedure Stop;

Stops all channels

Public procedure Pause;

Pause all channels

Public procedure Resume;

Resume all active channels

Properties

Public property Devices: TPHXSoundDeviceList read FDevices;

List of known audio devices

Public property Samples: TPHXAudioSamples read FSamples;

List of loaded samples

Public property Streams: TPHXAudioStreams read FStreams;

List of loaded samples

Public property Volume: Double read GetVolume write SetVolume;

Gets or sets the output master volume, from 0.0 (silent) to 1.0 (full)

Public property Device: IPHXAudioDevice read FDevice;

The current audio device interface


Generated by PasDoc 0.13.0 on 2013-08-26 11:02:35