Your play function has a while loop testing wave.isplaying. It won't return until it is false, so your similar setup in loop will always be false and thus your prints are never executed.
Your play function has a while loop testing wave.isplaying. It won't return until it is false, so your similar setup in loop will always be false and thus your prints are never executed.