From f3866f263539578517ef36a670e04ca48fa2d1d3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 Nov 2009 13:21:55 +0100 Subject: protocol: use the right sample rate for sources Use the correct sample rate for reporting about the timing. --- src/pulsecore/protocol-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index bb29a196..d49a78e5 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -2631,7 +2631,7 @@ static void command_get_record_latency(pa_pdispatch *pd, uint32_t command, uint3 pa_tagstruct_put_usec(reply, s->current_monitor_latency); pa_tagstruct_put_usec(reply, s->current_source_latency + - pa_bytes_to_usec(s->on_the_fly_snapshot, &s->source_output->sample_spec)); + pa_bytes_to_usec(s->on_the_fly_snapshot, &s->source_output->source->sample_spec)); pa_tagstruct_put_boolean(reply, pa_source_get_state(s->source_output->source) == PA_SOURCE_RUNNING && pa_source_output_get_state(s->source_output) == PA_SOURCE_OUTPUT_RUNNING); -- cgit From d9b5bbca017a8e578434e62ab6daeec24f2c11e1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2009 04:18:10 +0100 Subject: core: adjust volume only when there is actually a memory block Fixes an assert that is hit in somne niche cases: https://bugzilla.redhat.com/show_bug.cgi?id=533482 --- src/pulsecore/sink-input.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 1af2823f..aa84ccb1 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -717,14 +717,15 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p pa_memchunk rchunk; pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk); - if (nvfs) { - pa_memchunk_make_writable(&rchunk, 0); - pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); - } - /* pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */ if (rchunk.memblock) { + + if (nvfs) { + pa_memchunk_make_writable(&rchunk, 0); + pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk); pa_memblock_unref(rchunk.memblock); } -- cgit From 22946427624afde1d53973fa5a2e9e2041ffc5b7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2009 04:50:32 +0100 Subject: core: make cpuid code compile cleanly with 32bit PIC --- src/pulsecore/core-util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/pulsecore') diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 93ddf301..d596c481 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -117,6 +117,7 @@ #include #include #include +#include #include "core-util.h" @@ -3085,10 +3086,13 @@ pa_bool_t pa_running_in_vm(void) { pa_zero(sig); __asm__ __volatile__ ( - " xor %%ebx, %%ebx \n\t" + /* ebx/rbx is being used for PIC! */ + " push %%"PA_REG_b" \n\t" " cpuid \n\t" + " mov %%ebx, %1 \n\t" + " pop %%"PA_REG_b" \n\t" - : "=a" (eax), "=b" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2]) + : "=a" (eax), "=r" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2]) : "0" (eax) ); -- cgit