[pulseaudio-discuss] Yet another attempt to fight rewinds
David Henningsson
david.henningsson at canonical.com
Tue Sep 20 01:08:41 PDT 2011
On 09/19/2011 07:14 PM, Tanu Kaskinen wrote:
> On Mon, 2011-09-19 at 17:49 +0200, David Henningsson wrote:
>> + if (!pa_ratelimit_test(&s->thread_info.rewind_limit, PA_LOG_DEBUG)) {
>> + pa_log_warn("Okay, I'm sick and tired of all this rewinding. I'm going to sleep for %lu ms!",
>> + s->thread_info.rewind_limit.interval / PA_USEC_PER_MSEC);
>> + usleep(s->thread_info.rewind_limit.interval);
>> + pa_log_debug("Waking up.");
>> + }
>
> The patch seems otherwise ok to me, but I'd prefer the log prints to
> include the sink name. When a system has e.g. 6 sinks, all of which may
> be in active use at the same time, I really don't like the sink.c
> messages that don't tell which sink is in question... Also, instead of
> just "waking up", maybe it would be useful to have "waking up; not so
> sick and tired anymore" or something else that clearly connects the
> wakeup message to the preceding warning.
>
Sure. I don't mind changing the log messages. (As for sink names, I
think there was a plan to add that to the thread name in the log?)
I'm more concerned about what happens if we wake up and that sleep has
caused an underrun on the ALSA level, what that will do to the
watermark, etc.
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list