/[svn]/linuxsampler/trunk/src/scriptvm/examples/wait.txt
ViewVC logotype

Annotation of /linuxsampler/trunk/src/scriptvm/examples/wait.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2727 - (hide annotations) (download)
Tue Mar 31 17:46:11 2015 UTC (9 years ago) by schoenebeck
File MIME type: text/plain
File size: 1032 byte(s)
- Just added API doc comments to Script VM code.

1 schoenebeck 2581 { The wait function can be used to suspend execution of the current event
2     handler for the given amount of microseconds. Note that execution of an event
3     handler might also be automatically suspended by the sampler in case its
4 schoenebeck 2727 execution exceeded a certain limit of time.
5 schoenebeck 2581
6 schoenebeck 2727 If your script might get suspended for the reasons mentioned above, you should
7     be aware that all variables are global variables by default and all global
8     variables are shared with other execution instances of the script. So after a
9 schoenebeck 2581 suspended event handler execution is woken up again, the respective global
10     variables might not reflect what you wanted them to be, because in the
11     meantime other execution instances of your script might have altered them
12     already. In case this is an undesired behavior for you, then you should use
13     the "polyphonic" variable type for the respective variable instead.
14     }
15    
16     on note
17     message("function should suspend now")
18     wait(1000000)
19     message("this would be after suspension of 1000000 microseconds")
20     end on

  ViewVC Help
Powered by ViewVC