GetSoundMetaTags: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function outTag(player, command, id) | |||
if id then | |||
local soundid = getSoundMetaTags (id) | |||
outputChatBox("Sound "..id.." is a "..soundid.."!", player) | |||
else | |||
outputChatBox("Insert the sound id!", player) | |||
end | |||
end | |||
addCommandHandler("metatag", outTag) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 18:38, 23 June 2011
Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.
Syntax
table getSoundMetaTags ( element sound )
Required Arguments
- sound: a sound element.
Returns
Returns a table with all data available (keys are listed below) for the sound if successful, false otherwise.
- title
- artist
- album
- genre
- year
- comment
- track
- composer
- copyright
- subtitle
- album_artist
- stream_name
- stream_title
Example
function outTag(player, command, id) if id then local soundid = getSoundMetaTags (id) outputChatBox("Sound "..id.." is a "..soundid.."!", player) else outputChatBox("Insert the sound id!", player) end end addCommandHandler("metatag", outTag)
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