Class TCastlePlayingSound
Unit
Declaration
type TCastlePlayingSound = class(TComponent)
Description
Controls a sound playback. You can pass an instance of it to TSoundEngine.Play or TCastleSoundSource.Play. It allows to control sound playback before you start playing (like OnStop) and after (like Offset).
You can reuse the same instance of TCastlePlayingSound for playback many times, but you can start new playback only if the previous one finished. IOW, you can pass to TSoundEngine.Play or TCastleSoundSource.Play only instances when Playing is False. If you don't want to wait, just create a new instance of TCastlePlayingSound – they are designed to be lightweight, you can create them during runtime.
Destroying this class always stops the associated sound playback. Note that it is a TComponent descendant, so you can make it automatically destroyed when some owner TComponent is destroyed.
You can make your own descendants of this class, to associate any additional information with the playback of the sound.
Source: audio/castlesoundengine_playingsound.inc (line 40).
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastlePlayingSound
Generated by PasDoc 0.17.0.snapshot.