Yeah that will be very slow. Since the repeat section of the code makes it wait until that music/sound or whatever your trying to load plays through until the end before proceeding.
This,
Repeat
Sync
Until Sound Playing( MFile ) = 0
If you want the user to be able to interact while the music is playing you'll need to build a loop that manages the music and checks for input .
(Note: pseudo code)
; pick a music randomly and start it playing
MFile = Rnd ( 7 ) + 50
Play Sound MFile
Do
; has the current music stopped playing ?
; if so, randomly choose another and start it playing
if Sound Playing( MFile ) =0
MFile = Rnd ( 7 ) + 50
Play Sound MFile
endif
if Keystate(scancode())=1
; call the options section
gosub OptionsSection
endif
Sync
loop