MantisBT - opensim
View Issue Details
0008275opensim[REGION] Script Functionspublic2017-12-26 03:402018-04-10 00:50
djphil 
UbitUmarov 
normalminoralways
acknowledgedreopened 
PCWindows10
master (dev code) 
 
Grid (Multiple Regions per Sim)
ubODE
.NET / Windows64
None
FireStorm
0008275: [FEATURE REQUEST] llStopSound has no effect on llPlaySound or llTriggerSound etc ...
llStopSound has no effect on llPlaySound, llTriggerSound, LlTriggerSoundLimited etc ...

This is really limited!

I think it would be nice if llStopSound also stop the sound for llPlaySound, llTriggerSound, etc. and not just for llLoopSound.

Indeed, sometimes we need to stop a sound immediately and we have no way to do it now. It is very frustrating!

If you do not want to implement it in an LSL function, you might want to do it with a new OSSL function ...

The sound module in opensim is already so poor :(((
No tags attached.
Issue History
2017-12-26 03:40djphilNew Issue
2018-01-05 02:49UbitUmarovNote Added: 0032490
2018-01-05 03:55djphilNote Added: 0032492
2018-01-06 16:46FreakyTechNote Added: 0032493
2018-01-06 16:47FreakyTechNote Edited: 0032493bug_revision_view_page.php?bugnote_id=32493#r6527
2018-01-06 16:53FreakyTechNote Edited: 0032493bug_revision_view_page.php?bugnote_id=32493#r6528
2018-01-08 10:51djphilNote Added: 0032497
2018-03-12 02:29Total SorbetNote Added: 0032590
2018-03-12 20:05djphilNote Added: 0032591
2018-03-12 20:08djphilNote Edited: 0032591bug_revision_view_page.php?bugnote_id=32591#r6560
2018-04-09 14:25djphilStatusnew => resolved
2018-04-09 14:25djphilResolutionopen => fixed
2018-04-09 14:25djphilAssigned To => djphil
2018-04-09 14:25djphilStatusresolved => closed
2018-04-09 19:49UbitUmarovAssigned Todjphil =>
2018-04-09 19:49UbitUmarovStatusclosed => feedback
2018-04-09 19:49UbitUmarovResolutionfixed => reopened
2018-04-09 19:50UbitUmarovNote Added: 0032634
2018-04-09 19:50UbitUmarovAssigned To => UbitUmarov
2018-04-09 19:50UbitUmarovStatusfeedback => acknowledged
2018-04-09 19:58djphilNote Added: 0032635
2018-04-10 00:50UbitUmarovNote Added: 0032637

Notes
(0032490)
UbitUmarov   
2018-01-05 02:49   
don't think this can work on current viewers :(
(0032492)
djphil   
2018-01-05 03:55   
llStopSound works with llLoopSound so it should not be the end of the world to make it work with other sound functions like llPlaySound, llTriggerSound, LlTriggerSoundLimited etc ...
(0032493)
FreakyTech   
2018-01-06 16:46   
(edited on: 2018-01-06 16:53)
Actually llLoopSound and llStopSound use a completely different signaling.
The two functions configure a prim property.

The functions llPlaySound and llTriggerSound on use a different signaling that just triggers the sound.

llStopSound stops llLoopSound by actually changing a prim property.

llPlaySound has its own trigger message AttachedSound in viewer sim protocol.
llPlaySound has replace characteristics so a newly triggered attached sound replaces see http://wiki.secondlife.com/wiki/LlPlaySound. [^]

Only, llPlaySound can get some stop semantics due to the possibility to change AttachedSound volume by message. However, it would just play to the end silently.


llTriggerSound has the message SoundTrigger in viewer sim protocol and is even unattached regarding prim which means the viewer even does not know where it belongs to. llTriggerSound triggered sounds are fully independent and have no replace semantics.

llTriggerSound cannot be stopped afterwards at all.

I am not sure if that is in working state in OpenSim but you can actually silence a llPlaySound by llAdjustSoundVolume.

(0032497)
djphil   
2018-01-08 10:51   
Thank you FreakyTech for your detailed explanations.

Would not it be a good thing to make the necessary changes to make things better ... ?
It would then be possible to consider a "pause" sound for example.

These are still very basic things!
(0032590)
Total Sorbet   
2018-03-12 02:29   
llPlaySound("some valid uuid",0); //will stop sound
(0032591)
djphil   
2018-03-12 20:05   
(edited on: 2018-03-12 20:08)
Yes, setting volume to 0 produces the desired effect to stop "sound" properly (as llStopSound should do).

Here is a script to explain and analyze what happens with the sound playback and resume playback position after using llStopSound or llPlaySound with volume 0.

integer i;

default
{
    touch_start(integer n)
    {
        llPlaySound("a", 1.0);
        llSleep(0.5);
        if (i =! i) llStopSound();
        else llPlaySound("a", 0.0);
        llSleep(0.5);
        llPlaySound("a", 1.0);
    }
}

- With llPlaySound and volume 0, when you restart the sound after, the sound starts at the beginning of the sample.
- With llStopSound when you restart the sound afterwards, the sound does not start at the beginning of the sample.

Would not it be wise to do llStopSound as if it were llPlaySound on 0 to get the desired and valid result.

Because if you use volume 0 with llPlaySound, the result if you restart the sound after (eg: 1 second after) the sound should take a second further in the sample and NOT restart from the beginning.

Not easy to explain in English for me ... but I hope you understood :)

(0032634)
UbitUmarov   
2018-04-09 19:50   
this may need recheck
(0032635)
djphil   
2018-04-09 19:58   
Yes indeed Ubit, thank you to reopen this issue.
After having tested in SL (with SL viewer) at your request, I still noticed a difference in llStopSound on llPlaySound. In SL, with llPlaySound, the sound stops. It then starts again with the use of llPlaysound again.
(0032637)
UbitUmarov   
2018-04-10 00:50   
made a few changes on httptests.

note that by spec stop should only stop loop sounds
but with firestorm it also stops Play (not trigger)
singularity only stops loop.
hte diference is well visible on the viewers source.

before you ask Set Radius does nothing, viewers ignore it.