[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ON PLAY Trap for Background Music Remaining
ON PLAY(queuelimit) GOSUB {linenum | linelabel}
Establishes a subroutine to which Turbo Basic will branch if fewer
than a specified number of notes remain in the background music
buffer. The trap must also be turned on by means of a PLAY ON
statement.
queuelimit An integer expression specifying the number of notes to be
trapped.
linenum The first line of a music-handling subroutine. Setting
linenum to 0 disables trapping.
linelabel A label identifying the first line of a music-handling
routine.
--------------------------------------------------------------------------
Notes: With trapping in effect, and when Turbo Basic is executing
music in the background mode, when the number of notes
remaining is fewer than queuelimit, Turbo Basic branches
to the specified subroutine and temporarily suspends
trapping (by means of an implicit PLAY STOP statement).
Trapping automatically resumes when a RETURN from the
handling subroutine is executed (unless the handler
explicitly performs a PLAY OFF or PLAY STOP).
With event trapping in effect, Turbo Basic checks for the
specified event after each program statement. The $EVENT
metastatement can be used to turn event trapping on and
off at specified points within a program.
The size of the music buffer can be set by means of
$SOUND.
See Also:
$EVENT
$SOUND
PLAY (Event Trap)
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson