SoundID
SoundID (Function)
Format
soundid
returns integer_expression
Description
Returns the id of the most recently played sound. This is the same id SoundPlayer returns, but it lets you capture the id of a sound started with the simpler SoundPlay statement, so you can address it afterwards with SoundStop, SoundLength, and the other functions that take a player#.
Example
soundplay "song.mp3"
music = soundid # capture the id of what just started
pause 2.0
print soundposition(music)
soundstop music
See Also
Sound, SoundLength, SoundPlay, SoundPlayer, SoundPosition, SoundState, SoundStop
Availability
BASIC-256 2.0 and later. Documented from the BASIC-256 v2.1 continuation project.