Castle Game Engine: CastleSoundEngine

# Unit CastleSoundEngine
Description | Uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables
## Description 3D sound engine (TSoundEngine and TRepoSoundEngine). ## Uses SysUtils Classes CastleOpenAL CastleSoundAllocator CastleVectors CastleTimeUtils CastleXMLConfig Math FGL CastleClassUtils ## Overview ### Classes, Interfaces, Objects and Records
Name | Description
--- | ---
Class `ESoundBufferNotLoaded` |
Class `TSoundBuffersCache` |
Class `TSoundDevice` |
Class `TSoundEngine` | OpenAL sound engine.
Class `TSoundInfo` | Sound information, internally used by 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
`TSoundBuffer = CastleSoundAllocator.TSoundBuffer;`
`TSound = CastleSoundAllocator.TSound;`
`TSoundList = CastleSoundAllocator.TSoundList;`
`TSoundDistanceModel = (...);`
`TSoundBuffersCacheList = specialize TFPGObjectList<TSoundBuffersCache>;`
`TSoundDeviceList = specialize TFPGObjectList<TSoundDevice>;`
`TSoundType = Cardinal;`
`TSoundInfoList = specialize TFPGObjectList<TSoundInfo>;`
### Constants
`stNone = 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;`
`IgnoreAllMissingSounds: boolean;`
## 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
`TSoundBuffer = CastleSoundAllocator.TSoundBuffer;`
`TSound = CastleSoundAllocator.TSound;`
`TSoundList = CastleSoundAllocator.TSoundList;`
`TSoundDistanceModel = (...);`
###### Values dmNone: dmInverseDistance: dmInverseDistanceClamped: dmLinearDistance: dmLinearDistanceClamped: dmExponentDistance: dmExponentDistanceClamped:
`TSoundBuffersCacheList = specialize TFPGObjectList<TSoundBuffersCache>;`
`TSoundDeviceList = specialize TFPGObjectList<TSoundDevice>;`
`TSoundType = Cardinal;`
Unique sound type identifier for sounds used within TRepoSoundEngine. This is actually just an index to TRepoSoundEngine.SoundNames array, but you should always treat this as an opaque type.
`TSoundInfoList = specialize TFPGObjectList<TSoundInfo>;`
### Constants
`stNone = 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.
`IgnoreAllMissingSounds: boolean;`
Should TRepoSoundEngine.SoundFromName ignore (return stNone) all missing sounds. This works like RaiseError parameter for TRepoSoundEngine.SoundFromName was `True`. It's a debug feature, useful if you load resources but don't really plan to play their sounds, don't depend on it in your games.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:12