Difference between revisions of "LlAdjustSoundVolume"

From Second Life Wiki
Jump to navigation Jump to search
m
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{LSL_Function|func_id=207|func_sleep=0.1|func_energy=10.0|func=llAdjustSoundVolume|sort=AdjustSoundVolume
{{LSL_Function
|p1_type=float|p1_name=volume|p1_desc=number between 0.0 and 1.0 [0.0, 1.0] (0.0 <= '''volume''' <= 1.0)
|inject-2={{LSL_Function/volume|volume}}
|func_desc=Adjusts volume of attached sound (0.0 - 1.0)
|func=llAdjustSoundVolume
|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Functions]][[Category:LSL_Stub]]
|sort=AdjustSoundVolume
|func_id=207|func_sleep=0.1|func_energy=10.0
|p1_type=float|p1_name=volume
|func_footnote
|func_desc=Adjusts {{LSLP|volume}} of attached sound.
|return_text
|spec
|caveats
|constants
|examples=
<source lang="lsl2">
default
{
    state_entry()
    {
        llListen(42, "", llGetOwner(), "");
    }
 
    listen(integer chan, string name, key id, string msg)
    {
        float value = (float)msg;
        llAdjustSoundVolume(value);
        llOwnerSay("Volume set to: " + (string)value + " of 1.0");
    }
}
</source>
|helpers
|also_functions
|also_events
|also_tests
|also_articles
|notes
|permission
|negative_index
|cat1=Sound
|cat2
|cat3
|cat4
|history={{LSL Added|0.2.0|remote=http://secondlife.wikia.com/wiki/Version_0.2.0}}
}}

Revision as of 23:16, 21 January 2015

Summary

Function: llAdjustSoundVolume( float volume );

Adjusts volume of attached sound.

• float volume between 0.0 (silent) and 1.0 (loud) (0.0 <= volume <= 1.0)

Caveats

  • This function causes the script to sleep for 0.1 seconds.
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    state_entry()
    {
        llListen(42, "", llGetOwner(), "");
    }

    listen(integer chan, string name, key id, string msg)
    {
        float value = (float)msg;
        llAdjustSoundVolume(value);
        llOwnerSay("Volume set to: " + (string)value + " of 1.0");
    }
}

Deep Notes

History

Search JIRA for related Issues

Footnotes

  1. ^ Early release notes were not very accurate or thorough, they sometimes included information about features added in previous releases or failed to include information about features added in that release.

Signature

function void llAdjustSoundVolume( float volume );