HU/setSoundProperties: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
}} | }} | ||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua">bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )</syntaxhighlight> | <syntaxhighlight lang="lua">bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )</syntaxhighlight> | ||
{{OOP||[[sound]]:setProperties||getSoundProperties}} | {{OOP||[[sound]]:setProperties||getSoundProperties}} | ||
=== | ===Kötelező argumentumok=== | ||
*'''sound:''' a [[sound]] [[element]] that is created using [[playSound]] or [[playSound3D]] | *'''sound:''' a [[sound]] [[element]] that is created using [[playSound]] or [[playSound3D]] | ||
Line 19: | Line 19: | ||
*'''bReverse:''' a [[boolean]] representing whether the sound will be reversed or not. | *'''bReverse:''' a [[boolean]] representing whether the sound will be reversed or not. | ||
=== | ===Visszaadott érték=== | ||
Returns ''true'' if the properties sucessfully set, ''false'' otherwise. | Returns ''true'' if the properties sucessfully set, ''false'' otherwise. | ||
== | ==Példa== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 33: | Line 33: | ||
</section> | </section> | ||
== | ==Lásd még== | ||
{{Client_audio_functions hu}} | {{Client_audio_functions hu}} | ||
[[en:setSoundProperties]] | [[en:setSoundProperties]] | ||
[[ar:setSoundProperties]] | [[ar:setSoundProperties]] | ||
==Fordította== | |||
Surge |
Revision as of 12:36, 22 July 2018
Ez a funkció módosítja egy adott hang tulajdonságait.
Szintaxis
bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )
OOP Syntax Help! I don't understand this!
- Method: sound:setProperties(...)
- Counterpart: getSoundProperties
Kötelező argumentumok
- sound: a sound element that is created using playSound or playSound3D
- fSampleRate: a float that defines the new sound's sample rate
- bReverse: a boolean representing whether the sound will be reversed or not.
Visszaadott érték
Returns true if the properties sucessfully set, false otherwise.
Példa
Click to collapse [-]
Clientfunction editSongSound() local sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once setSoundProperties(sound, 48000.0, 128.00, 440.0, false) -- Set its samplerate to 48,000 Hz, tempo to 128.00, pitch to 440 Hz and not reversed end addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is started
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