Fix midiplay.py: allow the song to finish by draining buffer before terminating