Browse Source

[alsa-out] quantize PI controller output around resample_mean

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@3385 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.117.0
torben 17 years ago
parent
commit
9acf026ed0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tools/alsa_out.c

+ 2
- 2
tools/alsa_out.c View File

@@ -389,7 +389,7 @@ int process (jack_nframes_t nframes, void *arg) {
smooth_offset = 0.0;

current_resample_factor = 1.0 - smooth_offset / (double) catch_factor - offset_integral / (double) catch_factor / (double)catch_factor2;
current_resample_factor = floor( current_resample_factor * 100000.0 + 0.5 ) / 100000.0;
current_resample_factor = floor( (current_resample_factor - resample_mean) * 10000.0 + 0.5 ) / 10000.0 + resample_mean;
//current_resample_factor -= offset_integral / (double) nframes / (double)10000000 / (double) catch_factor;

//current_resample_factor -= pow(smooth_offset/ (double) nframes, 3) / (double) catch_factor;
@@ -437,7 +437,7 @@ int process (jack_nframes_t nframes, void *arg) {
outbuf = alloca( rlen * sizeof( ALSASAMPLE ) * num_channels );

floatbuf = alloca( rlen * sizeof( float ) );
resampbuf = alloca( nframes * sizeof( float ) );
resampbuf = alloca( rlen * sizeof( float ) );
/*
* render jack ports to the outbuf...
*/


Loading…
Cancel
Save