MantisBT - opensim
View Issue Details
0007186opensim[REGION] Scripting Enginepublic2014-05-23 09:532015-10-18 09:07
cuteulala 
 
highminoralways
newopen 
master (dev code) 
 
Standalone (1 Region)
BulletSim
Mono / Windows
None
Firestorm
0007186: Looping Sounds Stops
The sounds inside a prim stops looping when you make a change to the script thats looping the sound. In normal cases the changes should take effect immediatly aft rthe changes were made but instead the sound stops looping when it should be looping once more with the new changes
Create this script
default {
    state_entry() {
        llLoopSound( llGetInventoryName( INVENTORY_SOUND,0 ), 0.5 );
    }
}

//toss a sound inside a prim and then it will loop then after that change the 0.5 at the end of script to maby 1.0 and save script the sound will now cease to loop when it should be looping at its max volume now the only way to get it back is to restart sim.
No tags attached.
has duplicate 0007616new  Sound playing in object stops and does not restart when a parameter is changed 
related to 0007193new  llLoopSound breaks, when called more than one time 
Issue History
2014-05-23 09:53cuteulalaNew Issue
2014-05-28 02:13danbannerRelationship addedrelated to 0007193
2014-05-28 03:06djphilNote Added: 0026200
2015-06-17 01:23aiaustinRelationship addedhas duplicate 0007616
2015-06-17 01:25aiaustinNote Added: 0028733
2015-06-17 01:25aiaustinNote Edited: 0028733bug_revision_view_page.php?bugnote_id=28733#r4413
2015-06-17 04:52cuteulalaNote Added: 0028734
2015-07-09 03:02mewtwo0641Note Added: 0028885
2015-10-18 09:07UbitUmarovNote Added: 0029514

Notes
(0026200)
djphil   
2014-05-28 03:06   
I would also like to mention another problem with loopsound.
If you put a music loop (eg: techno loop) in a moving object (eg: RoolerCoaster), the tempo of the loop (bpm) is not met, it varies speed.
(0028733)
aiaustin   
2015-06-17 01:25   
Still present in r/26082.

The sound stops when (for example) the volume parameter is changed and the script saved and reset, but I found relogging as a user brought the sound back, rather than needing to restart the sim.

(0028734)
cuteulala   
2015-06-17 04:52   
LOL! i like it when sound tempo speeds up or slow down depending lolol but yes this issue can be anoying the only solution is to restart the sim :(
(0028885)
mewtwo0641   
2015-07-09 03:02   
I have seen this for a while. I've personally found that "kick starting" the sound produces a loop that works properly (Well it loops anyway :P)

Example:
----------------------------------------------------------------------------

string sound = "sound_here";

float volume = 0.3;

loopSound(string s, float v)
{
    //Stop any sounds playing first
    llStopSound();
    
    //Get the sound playing
    llPlaySound(s, v);
    llPlaySound(s, v);
    llPlaySound(s, v);
    llPlaySound(s, v);
    
    //Now loop it
    llLoopSound(s, v);
}

default
{
    state_entry()
    {
        loopSound(sound, volume);
    }
}

----------------------------------------------------------------------------

It's definitely not an elegant workaround but it seems to work for me.
(0029514)
UbitUmarov   
2015-10-18 09:07   
"sound tempo" is not a simulator issue. just viewer ideia of doppler effect I guess..