editStream: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Phergus moved page editStream to editAudioSource: Function renamed)
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[editAudioSource]]
{{stub|examples}}
{{MacroFunction
|name=editStream
|version=1.5.5
|description=
Edit an audio stream currently playing.
 
|usage=
<syntaxhighlight lang="mtmacro" line>
editStream(uri, cycleCount)
editStream(uri, cycleCount, volume)
editStream(uri, cycleCount, volume, start)
editStream(uri, cycleCount, volume, start, stop)
</syntaxhighlight>
 
'''Parameter'''
{{param|uri|The uri/url of the stream to edit. If set to "*", all audio streams are edited.}}
{{param|cycleCount|The number of times the audio should play. If set to 0, the file is cached but not played; if set to -1, the file is played continuously. If set to a blank string "", the property is not changed. Defaults to "".}}
{{param|volume|The volume the audio is to be played at. Can range from 0 to 1. If set to "", the property is not changed. Defaults to "".}}
{{param|start|The time offset in seconds where audio should start playing, or restart from when repeating. If set to "", the property is not changed. Defaults to "".}}
{{param|stop|The time offset where audio should stop playing or restart when repeating. If set to "", the property is not changed. Defaults to "".}}
 
}}
[[Category:Audio Function]]

Latest revision as of 23:59, 14 March 2023

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: examples

editStream() Function

Introduced in version 1.5.5
Edit an audio stream currently playing.

Usage

editStream(uri, cycleCount)
editStream(uri, cycleCount, volume)
editStream(uri, cycleCount, volume, start)
editStream(uri, cycleCount, volume, start, stop)

Parameter

  • uri - The uri/url of the stream to edit. If set to "*", all audio streams are edited.
  • cycleCount - The number of times the audio should play. If set to 0, the file is cached but not played; if set to -1, the file is played continuously. If set to a blank string "", the property is not changed. Defaults to "".
  • volume - The volume the audio is to be played at. Can range from 0 to 1. If set to "", the property is not changed. Defaults to "".
  • start - The time offset in seconds where audio should start playing, or restart from when repeating. If set to "", the property is not changed. Defaults to "".
  • stop - The time offset where audio should stop playing or restart when repeating. If set to "", the property is not changed. Defaults to "".