I don't think you will ever get TSS resolving this issue. Here is what you will likely have to do. This is the rough logic to two functions that will be used to create the delay you need. I think I have the rough logic pretty much correct. I don't have time or need to actually do it and test it in EL code (nor is it my job) but I think you will get the drift. Maybe when you get it done and tested you can donate the code to this thread.
John.
When you need to play a sound call functionStoreSound and submit the sound number to it and submit your estimate of the number of seconds of delay needed for this sound (could be a .wav file of your voice so it could be fairly long)
immediately Call functionPlaySound that does your play sounds. There are no parameters for this function.
Note: you may be able to combine these functions.
FunctionStoreSound(soundnumber, delayseconds)============================
When a sound is to be played update a rolling GV table of sounds that need to be played. (Rolling means when the pointer is off the end you set it back to the start and you do this in a common function. So you call the function submitting the sound number and the function does the roll for you). Here is some of the rough code you need (this is not EL coding).
Add 1 to GV_Sound_Count (if it is greater than your table size then alarm an error and figure out the solution - it may require a table size increase if thee is no bug)
Add 1 to the GV_table_pointer_added. (If it is greater than the table set it to the start of the table)
Store the sound number in the GV_table where GV_table_pointer_added is pointing.
Store the sound time estimate in a second GV table. Where GV_table_pointer_added is pointing.
FunctionPlaySound ============================
The function checks a GV_Sound_Count of the number of sounds it has pending to play.
If that number is zero then exit the function now.
note that if GV_table_pointer_played = GV_table_pointer_added then you have a bug since the above if test should have kicked you out. If this test is true create an alert.
Next the function checks GV_Sounds_Done which contains the estimated time_s in HHMMSS format when the last sound should have finished. The HHMMSS format allows a direct compare.
If the current time is less than that that estimated time then exit the function now.
Okay, now we know we have at least one sound to play and all prior sounds have been completed.
Use GV_table_pointer_played to know what the sound number is to be played.
First add 1 to GV_table_pointer_played. (If it is greater than the table set it to the start of the table)
Check to ensure that there is a sound number in the table where GV_table_pointer_played is pointing.
Play the sound and update the GV_Sounds_Done as currenttime_S + the estimate for this sound.
Remember that the seconds time estimate for this sound has been put in the second table (use the same pointer GV_table_pointer_played to get at this estimate). Also note that the function AddSubSeconds_s can be used to figure out how to do the add of the seconds. Do a search of the forum to find this function. Actually here is the thread
http://forum.tssupport.com/viewtopic.ph ... ght=addsub
Subtract 1 from GV_Sound_Count (check to ensure it is not less than 0)