audio.createSound: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = client
|name = audio.createSound
|side = client
|type = function
|type = function
|name = audio.createSound
|games = iii vc sa iv
|usage = add a sound that optionally loops
|desc = add a sound that optionally loops
|parameters = Stream audioData, bool loop
|arg1 = Stream audioData The stream of audio data.
|parameter1 = Stream audioData The stream of audio data.
|arg2 = bool loop Whether to play the sound repeatedly.
|parameter2 = bool loop Whether to play the sound repeatedly.
|return = Sound a sound object
|returnTypes = Sound
|freturn = void
|returnInfo = a sound object
|notes = The audio file needs to be loaded into a file stream using [[openFile|openFile]] before you can create a sound object with it.<br>
|returnFail1 = void
The only supported audio file types are [https://en.wikipedia.org/wiki/MP3 MP3] and [https://en.wikipedia.org/wiki/Ogg OGG]<br>
Due to an inherit bug with MP3's appending a small gap at the end of the file, you may experience a slight delay after each play of the audio file. This is especially noticeable when looping the audio. The only workaround for this is to convert the audio file to Ogg Vorbis (ogg) before using it in GTA Connected.
}}
}}
2,756

edits

Navigation menu