Unit CastleSoundEngine

Description

3D sound engine (TSoundEngine and TRepoSoundEngine).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class ENoMoreOpenALSources  
Class ESoundBufferNotLoaded  
Class EInvalidSoundBufferFree  
Class TSoundBuffer Sound buffer represents contents of a sound file, like Wav or OggVorbis, that (may be) loaded to OpenAL.
Class TSound Sound.
Class TSoundList  
Class TSoundAllocator Manager of allocated sounds.
Class TSoundDevice  
Class TSoundParameters Parameters to use when playing sound, see TSoundEngine.PlaySound.
Class TSoundEngine Sound engine, responsible for loading and playing sound.
Class TSoundInfo Sound information, internally used by TRepoSoundEngine.
Record TSoundType Unique sound type identifier for sounds used within TRepoSoundEngine.
Class TRepoSoundEngine Sound engine that keeps a repository of sounds, defined in a nice XML file.
Class TMusicPlayer Music player, to easily play a sound preloaded by TRepoSoundEngine.

Functions and Procedures

function SoundEngine: TRepoSoundEngine;

Types

ESoundFileError = CastleInternalSoundFile.ESoundFileError;
TSoundEvent = procedure (Sender: TSound) of object;
TSoundDistanceModel = (...);
TSoundDeviceList = specialize TObjectList<TSoundDevice>;
TSoundInfoList = specialize TObjectList<TSoundInfo>;

Constants

stNone: TSoundType = (Index: 0);
MaxSoundImportance = MaxInt;
LevelEventSoundImportance = 100000;
PlayerSoundImportance = 10000;
DefaultCreatureSoundImportance = 1000;
MinorNonSpatialSoundImportance = 100;

Variables

stPlayerInteractFailed:TSoundType;
stPlayerPickItem:TSoundType;
stPlayerDropItem:TSoundType;
stPlayerSwimming:TSoundType;
stPlayerDrowning:TSoundType;
stPlayerFootstepsDefault:TSoundType;
stPlayerToxicPain:TSoundType;
stPlayerSuddenPain:TSoundType;
stPlayerDies:TSoundType;
stPlayerSwimmingChange:TSoundType;
stMenuCurrentItemChanged:TSoundType;
stMenuClick:TSoundType;

Description

Functions and Procedures

function SoundEngine: TRepoSoundEngine;

The sound engine. Singleton instance of TRepoSoundEngine, the most capable engine class. Created on first call to this function.

Types

ESoundFileError = CastleInternalSoundFile.ESoundFileError;
 
TSoundEvent = procedure (Sender: TSound) of object;
 
TSoundDistanceModel = (...);
 
Values
  • dmNone
  • dmInverseDistance
  • dmInverseDistanceClamped
  • dmLinearDistance
  • dmLinearDistanceClamped
  • dmExponentDistance
  • dmExponentDistanceClamped
TSoundDeviceList = specialize TObjectList<TSoundDevice>;
 
TSoundInfoList = specialize TObjectList<TSoundInfo>;
 

Constants

stNone: TSoundType = (Index: 0);

Special sound type that indicates that there is actually no sound. TRepoSoundEngine.Sound and TRepoSoundEngine.Sound3D will do nothing when called with this sound type.

MaxSoundImportance = MaxInt;
 
LevelEventSoundImportance = 100000;
 
PlayerSoundImportance = 10000;
 
DefaultCreatureSoundImportance = 1000;
 
MinorNonSpatialSoundImportance = 100;
 

Variables

stPlayerInteractFailed:TSoundType;

Player sounds.

stPlayerPickItem:TSoundType;

Player sounds.

stPlayerDropItem:TSoundType;

Player sounds.

stPlayerSwimming:TSoundType;

Player sounds.

stPlayerDrowning:TSoundType;

Player sounds.

stPlayerFootstepsDefault:TSoundType;

Player sounds.

stPlayerToxicPain:TSoundType;

Player sounds.

stPlayerSuddenPain:TSoundType;

Player sounds.

stPlayerDies:TSoundType;

Player sounds.

stPlayerSwimmingChange:TSoundType;

Player sounds.

stMenuCurrentItemChanged:TSoundType;

Sounds used by TCastleOnScreenMenu.

stMenuClick:TSoundType;

Sounds used by TCastleOnScreenMenu.


Generated by PasDoc 0.15.0.