--- src/pulsecore/sink-input.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 553e3d9..58258ef 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -767,7 +767,8 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p pa_assert(chunk); pa_assert(volume); -/* pa_log_debug("peek"); */ + pa_log("peek"); + pa_log("render_memblockq: read_index = %li write_index = %li", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); pa_assert(i->thread_info.state == PA_SINK_INPUT_RUNNING || i->thread_info.state == PA_SINK_INPUT_CORKED || @@ -921,6 +922,8 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p pa_cvolume_mute(volume, i->sink->sample_spec.channels); else *volume = i->thread_info.soft_volume; + + pa_log("render_memblockq: read_index = %li write_index = %li", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); } /* Called from thread context */ @@ -932,9 +935,12 @@ void pa_sink_input_drop(pa_sink_input *i, size_t nbytes /* in sink sample spec * pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec)); pa_assert(nbytes > 0); -/* pa_log_debug("dropping %lu", (unsigned long) nbytes); */ + pa_log("dropping %lu", (unsigned long) nbytes); + pa_log("render_memblockq: read_index = %li write_index = %li", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); pa_memblockq_drop(i->thread_info.render_memblockq, nbytes); + + pa_log("render_memblockq: read_index = %li write_index = %li", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); } /* Called from thread context */ @@ -947,7 +953,8 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam pa_assert(PA_SINK_INPUT_IS_LINKED(i->thread_info.state)); pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec)); -/* pa_log_debug("rewind(%lu, %lu)", (unsigned long) nbytes, (unsigned long) i->thread_info.rewrite_nbytes); */ + pa_log("rewind(nbytes = %lu, rewrite_nbytes = %lu)", (unsigned long) nbytes, (unsigned long) i->thread_info.rewrite_nbytes); + pa_log("render_memblockq: read_index = %li write_index = %lu", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); lbq = pa_memblockq_get_length(i->thread_info.render_memblockq); @@ -1008,6 +1015,8 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam i->thread_info.rewrite_nbytes = 0; i->thread_info.rewrite_flush = FALSE; i->thread_info.dont_rewind_render = FALSE; + + pa_log("render_memblockq: read_index = %li write_index = %li", (long) pa_memblockq_get_read_index(i->thread_info.render_memblockq), (long) pa_memblockq_get_write_index(i->thread_info.render_memblockq)); } /* Called from thread context */ -- 1.7.5.3 --=-c1lh/DcIg7k+Y9O6OMo/ Content-Disposition: attachment; filename*0=0002-memblockq-Limit-rewinding-so-that-it-never-results-i.pat; filename*1=ch Content-Type: text/x-patch; name="0002-memblockq-Limit-rewinding-so-that-it-never-results-i.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit