Fix possible audio issues.

Don't sleep when there are too many samples in buffer.