|
Bostek Nostram
Registered User
Join date: 4 Oct 2008
Posts: 8
|
10-09-2008 01:23
I have this code: if(st_phobia_konferenca==1) { llPlaySound("AllMental1",1.0); // 10seconds llSleep(9); llPlaySound("AllMental2",1.0); // 10seconds llSleep(9); llPlaySound("AllMental3",1.0); llSleep(7); llSay(0,"All ,,,"  ; st_phobia_konferenca=0; st_phobia_konferenca2=1; } else if(st_phobia_konferenca2==1) { llPlaySound("In case of phobia the treatment11",1.0); // 5seconds llSleep(5); llPlaySound("In case of phobia the treatment12",1.0); //7seconds llSleep(7); llPlaySound("In case of phobia the treatment2",1.0); llSleep(2); llSay(0,"In case of ..."  ; st_phobia_konferenca2=0; st_phobia_konferenca3=1; } ..... When this is activated, sometimes plays only part of one sound, then waits and then plays another one... i dont know what is the problem... and i need solution soon  i preloaded sound on state_entry()...
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
10-09-2008 04:32
I think it's playsound that's the problem, when it gets an overlap it acts funny (plus sleep isn't exactly reliable)
you might look into other functions like triggersound or playsoundmaster/playsoundslave...
or if nothing else, it might be possible to have the sounds play from a subscript, controlled via link messages
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Bostek Nostram
Registered User
Join date: 4 Oct 2008
Posts: 8
|
10-09-2008 05:13
From: Void Singer I think it's playsound that's the problem, when it gets an overlap it acts funny (plus sleep isn't exactly reliable)
you might look into other functions like triggersound or playsoundmaster/playsoundslave...
or if nothing else, it might be possible to have the sounds play from a subscript, controlled via link messages It looks that llPlaySoundMaster doesnt exist, only slave... and what does llSetSoundQueueing((TRUE); mean and where should i put it?
|
|
Cappy Frantisek
Open Source is the Devil!
Join date: 27 Oct 2006
Posts: 400
|
10-09-2008 06:33
From: Bostek Nostram It looks that llPlaySoundMaster doesnt exist, only slave... and what does llSetSoundQueueing((TRUE); mean and where should i put it? From the wiki: llSetSoundQueueing(integer queue) Sets whether successive calls to llPlaySound, llLoopSound, etc., (attached sounds) interrupt the playing sound. The default for objects is FALSE. Setting queue to TRUE will make the sound wait until the current playing sound reaches its end. The queue is one level deep (i.e., only one sound will queue up at a time). Note: State transitions disable sound queueing. So the queue is set to TRUE, and then the state changes, sound queueing will be disabled. http://rpgstats.com/wiki/index.php?title=LlSetSoundQueueingAnd you can always put it in the state_entry function, in the state you use the llPlaySound function. But beware, only one level deep.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
10-09-2008 19:16
sry had loop sound on the mind (with the master/slave thing) ...
sound queueing looks to be the best method of solving your problem....
also not that if you try to play the same sound file before the first playthrough completes, it will be silently ignored... not sure if that senario is improved by queueing or not
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|