HU/getSoundLevelData: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
<syntaxhighlight lang="lua">int, int getSoundLevelData ( element theSound )</syntaxhighlight> | <syntaxhighlight lang="lua">int, int getSoundLevelData ( element theSound )</syntaxhighlight> | ||
{{OOP||[[sound]]:getLevelData}} | {{OOP||[[sound]]:getLevelData}} | ||
=== | ===Kötelező Argumentumok=== | ||
*'''theSound:''' the [[sound]] [[element]] which level data you want to return. | *'''theSound:''' the [[sound]] [[element]] which level data you want to return. | ||
=== | ===RVisszaadott érték=== | ||
Visszaad két egész számot 0 és 32767 között. | |||
== | ==Példa== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 31: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==Changelog== | ==Changelog== | ||
Line 39: | Line 36: | ||
{{ChangelogItem|1.3.2|Added player element to use a players voice}} | {{ChangelogItem|1.3.2|Added player element to use a players voice}} | ||
== | ==Lásd még== | ||
{{Client_audio_functions}} | {{Client_audio_functions hu}} | ||
[[en:getSoundLevelData]] | [[en:getSoundLevelData]] | ||
[[ar:getSoundLevelData]] | [[ar:getSoundLevelData]] | ||
[[pt-br:getSoundLevelData]] | |||
==Fordította== | |||
'''2018.07.11.''' <font size="3">'''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]'''''</font> |
Latest revision as of 17:14, 7 November 2024
This function gets the left/right level from a sound element. Ha az elem egy játékos, akkor ez a funkció a játékos hangját fogja használni.
Szintaxis
int, int getSoundLevelData ( element theSound )
OOP Syntax Help! I don't understand this!
- Method: sound:getLevelData(...)
Kötelező Argumentumok
RVisszaadott érték
Visszaad két egész számot 0 és 32767 között.
Példa
Click to collapse [-]
ClientsoundHandler = playSound ( "sound.wav" ) function onSoundPlayRender ( ) if ( soundHandler ) then local leftData, rightData = getSoundLevelData ( soundHandler ) if ( leftData ) then dxDrawRectangle ( 0, 0, 64, leftData / 32767 * 256, tocolor ( 255, 0, 0 ) ) dxDrawRectangle ( 64, 0, 64, rightData / 32767 * 256, tocolor ( 0, 0, 255 ) ) end end end addEventHandler ( "onClientRender", getRootElement(), onSoundPlayRender )
Changelog
Version | Description |
---|
1.3.2 | Added player element to use a players voice |
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
2018.07.11. Surge