HU/setSoundPosition: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function hu}} This function is used to change the seek position of the specified sound element. Use a player element to control a players voice with th...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function hu}} | {{Client function hu}} | ||
Ez a funkció a meghatározott hangelem keresési pozíciójának megváltoztatására használható. | |||
Használja a játékos elemet, hogy szabályozza a játékosok hangját ezzel a funkcióval.. | |||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua">bool setSoundPosition ( element theSound, float pos )</syntaxhighlight> | <syntaxhighlight lang="lua">bool setSoundPosition ( element theSound, float pos )</syntaxhighlight> | ||
{{OOP||[[sound]]:setPlaybackPosition|playbackPosition|getSoundPosition}} | {{OOP||[[sound]]:setPlaybackPosition|playbackPosition|getSoundPosition}} | ||
=== | ===Kötelező argumentumok=== | ||
*'''theSound:''' the [[sound]] element which seek position you want to modify. | *'''theSound:''' the [[sound]] element which seek position you want to modify. | ||
*'''pos:''' an float value representing the new seek position of the sound. Integer part of this value - seconds, fractional part - milliseconds. | *'''pos:''' an float value representing the new seek position of the sound. Integer part of this value - seconds, fractional part - milliseconds. | ||
=== | ===Visszaadott érték=== | ||
Returns ''true'' if the [[sound]] element's seek position was successfully changed, ''false'' otherwise. | Returns ''true'' if the [[sound]] element's seek position was successfully changed, ''false'' otherwise. | ||
== | ==Példa== | ||
This example allows the player to set how many milliseconds into the song he wants it to play from | This example allows the player to set how many milliseconds into the song he wants it to play from | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 34: | Line 34: | ||
{{ChangelogItem|1.3.2|Added player element for voice control}} | {{ChangelogItem|1.3.2|Added player element for voice control}} | ||
== | ==Lásd még== | ||
{{Client_audio_functions hu}} | {{Client_audio_functions hu}} | ||
[[en:setSoundPosition]] | [[en:setSoundPosition]] | ||
[[ar:setSoundPosition]] | [[ar:setSoundPosition]] | ||
==Fordította== | |||
Surge |
Revision as of 10:58, 22 July 2018
Ez a funkció a meghatározott hangelem keresési pozíciójának megváltoztatására használható. Használja a játékos elemet, hogy szabályozza a játékosok hangját ezzel a funkcióval..
Szintaxis
bool setSoundPosition ( element theSound, float pos )
OOP Syntax Help! I don't understand this!
- Method: sound:setPlaybackPosition(...)
- Variable: .playbackPosition
- Counterpart: getSoundPosition
Kötelező argumentumok
- theSound: the sound element which seek position you want to modify.
- pos: an float value representing the new seek position of the sound. Integer part of this value - seconds, fractional part - milliseconds.
Visszaadott érték
Returns true if the sound element's seek position was successfully changed, false otherwise.
Példa
This example allows the player to set how many milliseconds into the song he wants it to play from
theSound = playSound("music/song.mp3") function setSongPos(cmd, tm) tm = tonumber(tm) local ssp = setSoundPosition(theSound,tm) if ssp then outputChatBox("Sound is now playing from: "..tostring(tm)) else outputChatBox("An error has occured.") end end addCommandHandler("skipsong", setSongPos)
Changelog
Version | Description |
---|
1.3.2 | Added player element for voice control |
Lásd még
- HU/getRadioChannel
- HU/getRadioChannelName
- HU/getSFXStatus
- HU/getSoundBPM
- HU/getSoundEffects
- HU/getSoundFFTData
- HU/getSoundLength
- HU/getSoundLevelData
- HU/getSoundMaxDistance
- HU/getSoundMetaTags
- HU/getSoundMinDistance
- HU/getSoundPan
- HU/getSoundPosition
- HU/getSoundProperties
- HU/getSoundSpeed
- HU/getSoundVolume
- HU/getSoundWaveData
- HU/isSoundPanningEnabled
- HU/isSoundPaused
- HU/playSFX
- HU/playSFX3D
- HU/playSound
- HU/playSound3D
- HU/playSoundFrontEnd
- HU/setRadioChannel
- HU/setSoundEffectEnabled
- HU/setSoundMaxDistance
- HU/setSoundMinDistance
- HU/setSoundPan
- HU/setSoundPanningEnabled
- HU/setSoundPaused
- HU/setSoundPosition
- HU/setSoundProperties
- HU/setSoundSpeed
- HU/setSoundVolume
- HU/stopSound
Fordította
Surge