From f224e7e3b486ce86cffd4840c6088901a0a4d0fa Mon Sep 17 00:00:00 2001 From: torben Date: Tue, 3 Mar 2009 02:38:22 +0000 Subject: [PATCH] [alsa-out] safety commit (somethings wrong) git-svn-id: svn+ssh://jackaudio.org/trunk/jack@3384 0c269be4-1314-0410-8aa9-9f06e86f4224 --- tools/alsa_out.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/alsa_out.c b/tools/alsa_out.c index 491c735..94ebab6 100644 --- a/tools/alsa_out.c +++ b/tools/alsa_out.c @@ -296,7 +296,7 @@ int process (jack_nframes_t nframes, void *arg) { int rlen; int err; snd_pcm_sframes_t delay = target_delay; - + int i; snd_pcm_delay( alsa_handle, &delay ); @@ -311,6 +311,10 @@ int process (jack_nframes_t nframes, void *arg) { delay = target_delay; //current_resample_factor = (double) sample_rate / (double) jack_sample_rate; current_resample_factor = resample_mean; + offset_integral = - (resample_mean - 1.0) * catch_factor * catch_factor2; + //offset_integral = 0; + for( i=0; i