[mythtv] "ran out of free AUDIO buffers :-(" Fix
Isaac Richards
mythtv-dev@snowman.net
Sun Jan 5 20:55:58 EST 2003
On Sunday 05 January 2003 03:32 pm, Xepo wrote:
> Evidently this feature isn't too well tested, because leaving these
> lines in there cause the "ran out of free AUDIO buffers" message.
What was the buffer size before you commented out all that?
> The reason for changing the usleep: If the write thread is started
> before the buffering or encoding thread, then the write thread will
> automatically wait one second for either of them. I'm thinking that the
> buffering or encoding threads run out of buffers before the writing
> thread is done waiting one second. Then it swaps around. The encoding
> or buffering threads are waiting a while, while the writing thread runs
> out of buffers.
>
> 100ms was just an arbitrary number, I was going through the code and
> trying to find the cause, saw that, thought "Why would something that's
> supposed to be real-time be waiting a full second at any point?" and
> tried out 100ms. So, if you would like me to experiment more with this,
> I will.
usleep is micro-seconds, not milliseconds. You're off by a factor of 1000 in
your numbers there.
Isaac
More information about the mythtv-dev
mailing list