Log the reason for every suspend/resume.

I was looking at a log that showed that a suspend happened (at
a strange time), but the log didn't tell me why the suspend was done.
This patch tries to make sure that that won't happen again.
This commit is contained in:
Tanu Kaskinen 2012-11-16 18:24:34 +02:00
parent 28c49a12fc
commit 0f44b1e820
12 changed files with 76 additions and 25 deletions

View file

@ -1006,6 +1006,7 @@ pa_bool_t pa_source_update_rate(pa_source *s, uint32_t rate, pa_bool_t passthrou
if (!passthrough && pa_source_used_by(s) > 0)
return FALSE;
pa_log_debug("Suspending source %s due to changing the sample rate.", s->name);
pa_source_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
if (s->update_rate(s, desired_rate) == TRUE) {