PlayOptions
Index
Properties
optionalduration
Duration in seconds to play this track for, overrides Sound.duration
optionalloop
Loop this track, overrides Sound.loop
optionalonPlay
Audio graph hook for this track (and its later resumes), overrides Sound.onPlay. See AudioGraphBuilder.
optionalpitch
Pitch shift in cents for this track, overrides Sound.pitch
optionalplaybackRate
Playback speed multiplier for this track, overrides Sound.playbackRate
optionalposition
Position in seconds to start this track from, overrides Sound.position
optionalscheduledStartTime
Schedule time to play in milliseconds from the audio context origin
Compute using the audio context
const sound: Sound = ...;
const oneThousandMillisecondsFromNow = AudioContextFactory.currentTime() + 1000;
sound.play({ scheduledStartTime: oneThousandMillisecondsFromNow });optionalvolume
Volume [0-1] of this track, multiplied with Sound.volume. Default 1.
One-off overrides for a single playback, see Sound.play. Unset options fall back to the Sound's configuration; nothing here changes the Sound itself.