No sound. Cursor stops.

I was playing a song on Audacity and it was working fine. When I clicked on the timeline to move the playing location, I got a message that the playback device could not be loaded. Then, no more sound. I restarted Audacity, and the device I had been using (“HDA [something I don’t remember]”) was gone, and now I can only choose between “pulse” and “default” (from Alsa). When I try either one, the audio plays for like 50 milliseconds, and then the cursor stands still forever (as well as the volume bars), and no audio comes out anymore.
The program itself doesn’t crash or freeze.
Any ideas?

Just after I clicked the “Submit” button to create this topic, I had an idea, and it worked: I ran Audacity with the command
env PULSE_LATENCY_MSEC=300 audacity
Works perfectly now!