Not sure if this is necessarily a bug or what, but when I call sound playing() it's internal value doesn't seem to update unless sync is called.
sync on
load sound "thing.wav", 1
play sound 1
repeat
`sync
until sound playing(1) = 0
Technically, the above code would more or less pause the application until the sound finished playing. However, it never exits the loop unless sync is used.
I managed a workaround using timer since I knew the length of the sound being played and it didn't have to be exact.
"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke