HU/getSoundLevelData: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
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"> |
Revision as of 17:34, 18 July 2018
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 )
Requirements
This template will be deleted.
Changelog
Version | Description |
---|
1.3.2 | Added player element to use a players voice |
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd