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 TInternalSoundSourceList |
|
Class TCastleSound |
Sound that can be loaded from URL (possibly reusing a cache, possibly using streaming) and played. |
Class TCastlePlayingSound |
Controls a sound playback. |
Class TSoundAllocator |
Manager of allocated sounds. |
Class TSoundEngine |
Sound engine, responsible for loading and playing sound. |
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 ESoundBufferNotLoaded |
|
Class EInvalidSoundBufferFree |
|
Class EInvalidSoundRepositoryXml |
Functions and Procedures
function SoundEngine: TRepoSoundEngine; |
Types
TSoundDistanceModel = CastleSoundBase.TSoundDistanceModel; |
TSoundDevice = CastleSoundBase.TSoundDevice; |
TSoundBuffer = TInternalSoundBuffer deprecated 'use TInternalSoundBuffer'; |
TInternalSoundSourceEvent = procedure (Sender: TInternalSoundSource) of object; |
TSound = TInternalSoundSource deprecated 'play sounds using TCastleSoundSource + TCastleSound'; |
TSoundParameters = TPlaySoundParameters deprecated 'use TPlaySoundParameters'; |
TSoundType = TCastleSound deprecated 'use TCastleSound'; |
TMusicPlayer = TLoopingChannel deprecated 'use TLoopingChannel'; |
ENoMoreSources = CastleSoundBase.ENoMoreSources; |
ENoMoreOpenALSources = ENoMoreSources deprecated 'use ENoMoreSources'; |
ESoundFileError = CastleSoundBase.ESoundFileError; |
Constants
stNone: TCastleSound = nil deprecated 'use nil'; |
MaxSoundImportance = MaxInt deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
LevelEventSoundImportance = 100000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
PlayerSoundImportance = 10000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
DefaultCreatureSoundImportance = 1000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
MinorNonSpatialSoundImportance = 100 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
DefaultSoundImportance = 10 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
dmInverse = CastleSoundBase.dmInverse; |
dmLinear = CastleSoundBase.dmLinear; |
dmInverseDistance = dmInverse deprecated 'use dmInverse'; |
dmInverseDistanceClamped = dmInverse deprecated 'use dmInverse'; |
dmLinearDistance = dmLinear deprecated 'use dmLinear'; |
dmLinearDistanceClamped = dmLinear deprecated 'use dmLinear'; |
LoadSound_FileFilters =
'All Files|*|' +
'*All Sound Files|*.wav;*.ogg|' +
'WAV (*.wav)|*.wav|' +
'OggVorbis (*.ogg)|*.ogg'; |
Variables
stPlayerInteractFailed:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerPickItem:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerDropItem:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerSwimming:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerDrowning:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerFootstepsDefault:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerToxicPain:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerSuddenPain:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerDies:TCastleSound deprecated 'these predefined sounds should not be used'; |
stPlayerSwimmingChange:TCastleSound deprecated 'these predefined sounds should not be used'; |
stMenuCurrentItemChanged:TCastleSound deprecated 'these predefined sounds should not be used'; |
stMenuClick:TCastleSound deprecated 'these predefined sounds should not be used'; |
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
TSoundDistanceModel = CastleSoundBase.TSoundDistanceModel; |
TSoundDevice = CastleSoundBase.TSoundDevice; |
TSoundBuffer = TInternalSoundBuffer deprecated 'use TInternalSoundBuffer'; |
Warning: this symbol is deprecated: use TInternalSoundBuffer |
TInternalSoundSourceEvent = procedure (Sender: TInternalSoundSource) of object; |
type // allow type declaration to continue |
TSound = TInternalSoundSource deprecated 'play sounds using TCastleSoundSource + TCastleSound'; |
Warning: this symbol is deprecated: play sounds using TCastleSoundSource + TCastleSound |
TSoundParameters = TPlaySoundParameters deprecated 'use TPlaySoundParameters'; |
Warning: this symbol is deprecated: use TPlaySoundParameters |
TSoundType = TCastleSound deprecated 'use TCastleSound'; |
Warning: this symbol is deprecated: use TCastleSound Unique sound type identifier for sounds used within TRepoSoundEngine. |
TMusicPlayer = TLoopingChannel deprecated 'use TLoopingChannel'; |
Warning: this symbol is deprecated: use TLoopingChannel |
ENoMoreSources = CastleSoundBase.ENoMoreSources; |
Copyright 2010-2021 Michalis Kamburelis. This file is part of "Castle Game Engine". "Castle Game Engine" is free software; see the file COPYING.txt, included in this distribution, for details about the copyright. "Castle Game Engine" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. —————————————————————————- |
ENoMoreOpenALSources = ENoMoreSources deprecated 'use ENoMoreSources'; |
Warning: this symbol is deprecated: use ENoMoreSources |
ESoundFileError = CastleSoundBase.ESoundFileError; |
Constants
stNone: TCastleSound = nil deprecated 'use nil'; |
Warning: this symbol is deprecated: use nil Special sound type that indicates that there is actually no sound. TSoundEngine.Sound and TSoundEngine.Sound3D will do nothing when called with this sound type. |
MaxSoundImportance = MaxInt deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
LevelEventSoundImportance = 100000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
PlayerSoundImportance = 10000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
DefaultCreatureSoundImportance = 1000 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
MinorNonSpatialSoundImportance = 100 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
DefaultSoundImportance = 10 deprecated 'use TCastleSound.Priority, which is float, and figure out good priorities for your game'; |
Warning: this symbol is deprecated: use TCastleSound.Priority, which is float, and figure out good priorities for your game |
dmInverse = CastleSoundBase.dmInverse; |
dmLinear = CastleSoundBase.dmLinear; |
dmInverseDistance = dmInverse deprecated 'use dmInverse'; |
Warning: this symbol is deprecated: use dmInverse |
dmInverseDistanceClamped = dmInverse deprecated 'use dmInverse'; |
Warning: this symbol is deprecated: use dmInverse |
dmLinearDistance = dmLinear deprecated 'use dmLinear'; |
Warning: this symbol is deprecated: use dmLinear |
dmLinearDistanceClamped = dmLinear deprecated 'use dmLinear'; |
Warning: this symbol is deprecated: use dmLinear |
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 TCastleWindow.FileDialog. |
Variables
stPlayerInteractFailed:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerPickItem:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerDropItem:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerSwimming:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerDrowning:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerFootstepsDefault:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerToxicPain:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerSuddenPain:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerDies:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stPlayerSwimmingChange:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Player sounds. |
stMenuCurrentItemChanged:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Sounds used by TCastleOnScreenMenu. |
stMenuClick:TCastleSound deprecated 'these predefined sounds should not be used'; |
Warning: this symbol is deprecated: these predefined sounds should not be used Sounds used by TCastleOnScreenMenu. |
Generated by PasDoc 0.16.0.