summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorJason Newton <nevion@gmail.com>2009-08-16 16:14:30 -0700
committerJason Newton <nevion@gmail.com>2009-09-29 23:50:54 -0700
commitab0e20ab2c0014e495cadb9c4f8e188df125fa7f (patch)
tree6821decbb30f04046c2e456f87cfc4a481d7a33c /src/modules
parent7bd7ce6deca125d9061ea8d29f6a17e65ba36116 (diff)
module-equalizer-sink: fixed timeval initialization
Diffstat (limited to 'src/modules')
-rwxr-xr-xsrc/modules/module-equalizer-sink.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 9a4740f3..a8ccff8b 100755
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -40,6 +40,7 @@ USA.
#include <pulse/i18n.h>
#include <pulse/timeval.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/aupdate.h>
#include <pulsecore/core-error.h>
#include <pulsecore/namereg.h>
@@ -510,7 +511,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
pa_sink_process_rewind(u->sink, 0);
//pa_log_debug("start output-buffered %ld, input-buffered %ld, requested %ld",buffered_samples,u->samples_gathered,samples_requested);
- pa_timeval_load(&start);
+ pa_rtclock_get(&start);
do{
size_t input_remaining = u->window_size - u->samples_gathered;
pa_assert(input_remaining > 0);
@@ -532,27 +533,27 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
pa_memblockq_drop(u->input_q, tchunk.length);
//pa_log_debug("asked for %ld input samples, got %ld samples",input_remaining,buffer->length/fs);
/* copy new input */
- //pa_timeval_load(start);
+ //pa_rtclock_get(start);
if(u->first_iteration){
initialize_buffer(u, &tchunk);
}else{
input_buffer(u, &tchunk);
}
- //pa_timeval_load(&end);
+ //pa_rtclock_get(&end);
//pa_log_debug("Took %0.5f seconds to setup", pa_timeval_diff(end, start) / (double) PA_USEC_PER_SEC);
pa_memblock_unref(tchunk.memblock);
}while(u->samples_gathered < u->window_size);
- pa_timeval_load(&end);
+ pa_rtclock_get(&end);
pa_log_debug("Took %0.6f seconds to get data", (double) pa_timeval_diff(&end, &start) / PA_USEC_PER_SEC);
pa_assert(u->fft_size >= u->window_size);
pa_assert(u->R < u->window_size);
/* set the H filter */
u->H = u->Hs[pa_aupdate_read_begin(u->a_H)];
- pa_timeval_load(&start);
+ pa_rtclock_get(&start);
/* process a block */
process_samples(u, chunk);
- pa_timeval_load(&end);
+ pa_rtclock_get(&end);
pa_log_debug("Took %0.6f seconds to process", (double) pa_timeval_diff(&end, &start) / PA_USEC_PER_SEC);
pa_aupdate_read_end(u->a_H);