Unit CastleSoundEngine
Description
Cross-platform, spatial sound playback engine (SoundEngine singleton).
Uses
- SysUtils
- Classes
- Math
- Generics.Collections
- DOM
- CastleVectors
- CastleTimeUtils
- CastleClassUtils
- CastleStringUtils
- CastleSoundBase
- CastleInternalSoundFile
- CastleInternalAbstractSoundBackend
- CastleXMLConfig
Overview
Classes, Interfaces, Objects and Records
| Name | Description |
|---|---|
Class ESoundBufferNotLoaded |
|
Class EInvalidSoundBufferFree |
|
Class EInvalidSoundRepositoryXml |
|
Class TSoundBuffer |
Sound buffer represents contents of a sound file, like Wav or OggVorbis, that (may be) played. |
Class TSound |
Sound source that can be immediately played. |
Class TSoundList |
|
Class TSoundAllocator |
Manager of allocated sounds. |
Class TSoundParameters |
Parameters to use when playing sound, see TSoundEngine.PlaySound. |
Class TSoundEngine |
Sound engine, responsible for loading and playing sound. |
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 TLoopingChannel |
Looping sound management, to easily play music or other looping sounds. |
Class TCastleSound |
Sound file that can be loaded from URL (possibly reusing a cache, possibly using streaming) and played. |
Functions and Procedures
function SoundEngine: TRepoSoundEngine; |
Types
ENoMoreSources = CastleSoundBase.ENoMoreSources; |
ENoMoreOpenALSources = ENoMoreSources deprecated 'use ENoMoreSources'; |
ESoundFileError = CastleSoundBase.ESoundFileError; |
TSoundEvent = procedure (Sender: TSound) of object; |
TSoundDistanceModel = CastleSoundBase.TSoundDistanceModel; |
TSoundDevice = CastleSoundBase.TSoundDevice; |
TMusicPlayer = TLoopingChannel; |
Constants
stNone: TSoundType = (Index: 0); |
MaxSoundImportance = MaxInt; |
LevelEventSoundImportance = 100000; |
PlayerSoundImportance = 10000; |
DefaultCreatureSoundImportance = 1000; |
MinorNonSpatialSoundImportance = 100; |
DefaultSoundImportance = 10; |
dmNone = CastleSoundBase.dmNone; |
dmInverseDistance = CastleSoundBase.dmInverseDistance; |
dmInverseDistanceClamped = CastleSoundBase.dmInverseDistanceClamped; |
dmLinearDistance = CastleSoundBase.dmLinearDistance; |
dmLinearDistanceClamped = CastleSoundBase.dmLinearDistanceClamped; |
dmExponentDistance = CastleSoundBase.dmExponentDistance; |
dmExponentDistanceClamped = CastleSoundBase.dmExponentDistanceClamped; |
LoadSound_FileFilters =
'All Files|*|' +
'*All Sound Files|*.wav;*.ogg|' +
'WAV (*.wav)|*.wav|' +
'OggVorbis (*.ogg)|*.ogg'; |
Variables
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
ENoMoreSources = CastleSoundBase.ENoMoreSources; |
ENoMoreOpenALSources = ENoMoreSources deprecated 'use ENoMoreSources'; |
|
Warning: this symbol is deprecated: use ENoMoreSources |
ESoundFileError = CastleSoundBase.ESoundFileError; |
TSoundEvent = procedure (Sender: TSound) of object; |
TSoundDistanceModel = CastleSoundBase.TSoundDistanceModel; |
TSoundDevice = CastleSoundBase.TSoundDevice; |
TMusicPlayer = TLoopingChannel; |
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; |
DefaultSoundImportance = 10; |
dmNone = CastleSoundBase.dmNone; |
dmInverseDistance = CastleSoundBase.dmInverseDistance; |
dmInverseDistanceClamped = CastleSoundBase.dmInverseDistanceClamped; |
dmLinearDistance = CastleSoundBase.dmLinearDistance; |
dmLinearDistanceClamped = CastleSoundBase.dmLinearDistanceClamped; |
dmExponentDistance = CastleSoundBase.dmExponentDistance; |
dmExponentDistanceClamped = CastleSoundBase.dmExponentDistanceClamped; |
LoadSound_FileFilters =
'All Files|*|' +
'*All Sound Files|*.wav;*.ogg|' +
'WAV (*.wav)|*.wav|' +
'OggVorbis (*.ogg)|*.ogg'; |
|
Supported sound file formats. Use these filters with LCL file dialog (easily set by FileFiltersToDialog) or TCastleWindowBase.FileDialog. |
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.16.0.