I fixed it. For some reason, making mpg321 exit in the middle of reading or something was making everything freeze. So I changed Stop() to set a global variable to 1 and in the until loop, I added 'last if $Stop'. Right outside that, I tested for a true $Stop value and set it to false and forced the player to exit there. I'll post the code later.