Really appreciate any of your suggestion!
Underrun is caused by your flow-graph not being able to provide samples to the
hardware at the specified rate. It looks to me like in
your flow-graph above, your message-queue can easily get starved for new
bits, and so the entire flow-graph stalls. But that's just
after a superficial inspection. Since you actually *go to sleep* for an
entire second, it seems like it would be pretty easy for the flow-graph
to stall.
Thank you so much for your reply. I am wondering what the reason causes my message-queue could easily get starved for new bits? How to avoid this problem with my message-queue? Is the problem of the wrong setting about the msg_limit for the message-queue? I do not understand how to set the limit for msgq. What it depends on?
I tried to make the bits loading thread "sleep" for only 0.005s, though still
the underrun occurs. What is the reason of that?
Thanks you so much for any of your suggestions.
Thanks,
Yan