stopSound: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=stopStream
|name=stopSound
|version=1.5.5
|version=1.5.5
|description=
|description=
Stop an audio stream currently playing.
Stop an audio stream or clip currently playing.


|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
stopStream()
stopSound()
stopStream(uri)
stopSound(uri)
stopStream(uri, remove)
stopSound(uri, remove)
stopStream(uri, remove, fadeout)
stopSound(uri, remove, fadeout)
</source>
</source>


'''Parameter'''
'''Parameter'''
{{param|uri|The uri/url of the stream to stop. If set to "*", all audio streams are stopped. Defaults to "*".}}
{{param|uri|The uri/url of the stream or clip to stop. If set to "*", all audio stream or clips are stopped. Defaults to "*".}}
{{param|remove|If set to 1, the audio file is removed from memory. Defaults to 1.}}
{{param|remove|If set to 1, the audio file is removed from memory. Defaults to 1.}}
{{param|fadeout|Optional fadeout (in seconds) before stopping the stream. If set to 0, stop as soon as possible. Defaults to 0.}}
{{param|fadeout|Optional fadeout (in seconds) before stopping the stream or clip. If set to 0, stop as soon as possible. Defaults to 0.}}


|changes=
|changes=

Revision as of 16:52, 21 October 2019

stopSound() Function

Introduced in version 1.5.5
Stop an audio stream or clip currently playing.

Usage

stopSound()
stopSound(uri)
stopSound(uri, remove)
stopSound(uri, remove, fadeout)

Parameter

  • uri - The uri/url of the stream or clip to stop. If set to "*", all audio stream or clips are stopped. Defaults to "*".
  • remove - If set to 1, the audio file is removed from memory. Defaults to 1.
  • fadeout - Optional fadeout (in seconds) before stopping the stream or clip. If set to 0, stop as soon as possible. Defaults to 0.


Version Changes

  • 1.5.7 - Renamed from stopStream to support both streams and clips.