OneShotSource
internal class ↳ extends ToneAudioNode<Options>
Base class for fire-and-forget nodes
Constructor
Section titled “Constructor”new OneShotSource(options: OneShotSourceOptions)Parameters
- options
OneShotSourceOptions
Properties
Section titled “Properties”getStateAtTime
Section titled “getStateAtTime”getStateAtTime: (time: Time) => BasicPlaybackStateGet the playback state at the given time
onended
Section titled “onended”onended: onEndedCallbackThe callback to invoke after the source is done playing.
Default: noOp
Methods
Section titled “Methods”cancelStop()
Section titled “cancelStop()”cancelStop(): thisCancel a scheduled stop event
Returns this
stop()
Section titled “stop()”stop(time?: Time): thisStop the source node at the given time.
Parameters
-
time
TimeoptionalWhen to stop the source
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): OneShotSourceOptionsReturns all of the default options belonging to the class.
Returns OneShotSourceOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: name, channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()