Class TCastleSound

Unit

Declaration

type TCastleSound = class(TCastleComponent)

Description

Sound that can be loaded from Url (possibly reusing a cache, possibly using streaming) and played.

Aside from sound file (also called "sound buffer" or "audio clip" in various APIs) this class allows to configue also playback values, like Volume and Pitch. These playback values are intended to reflect preferences specific to this sound file. They are multiplied by playback values of the TCastleSoundSource (TCastleSoundSource.Volume, TCastleSoundSource.Pitch) and TCastlePlayingSound (to adjust it per-playback, using TCastlePlayingSound.Volume, TCastlePlayingSound.Pitch).

This class does not actually play the sound. It only defines something that can be played. To play the sound use TSoundEngine.Play or TCastleSoundSource. For spatial sounds, attach TCastleSoundSource to a TCastleTransform within some TCastleViewport and set TCastleSoundSource.Sound or call TCastleSoundSource.Play.

Source: audio/castlesoundengine_sound.inc (line 59).

Hierarchy


Generated by PasDoc 0.17.0.snapshot.