Thanks for the reply, zentara. I posted a list of hardware above. What hardware and OS are you running?
Since the problem only occurs when I'm using sound, I guess the best option I can think of is something like this. Have the program fork itself. Fork A is responsible for reading sound input and storing the results in a circular buffer on disk. Fork B runs the GUI and only reads from the buffer file when needed. Does this seem like a reasonable plan?