~pbatch/gestvm

86e3044ace8bff63ed01e55eb55d0e5ef34f1bba — Paul Batchelor 1 year, 3 months ago 23122bf
rephasor: more words
1 files changed, 16 insertions(+), 2 deletions(-)

M gestvm.org
M gestvm.org => gestvm.org +16 -2
@@ 411,7 411,7 @@ a total of 2 samples of delay. This is accounted for
when computing the correction amount.

The correction value is clamped to be between 2.0 and
0.5. Anything out of these bounds is mostly likely an
0.5. Anything out of these bounds is most likely an
invalid value.

#+NAME: funcs


@@ 675,7 675,19 @@ static SKFLT rephasor_tick(gestvm *gvm, SKFLT phs)
    return out;
}
#+END_SRC
** Rephasor Control
** Rephasor Data
The core rephasor is encapsulated in a =gestvm_rephasor=
struct =rephasor=.

The rescaling factor is represented as a rational fraction;
Two integer values make the numerator (=num=) and the
denominator (=den=).

The =update_rephasor= flag is set anytime gestvm updates
the rescaling factor. When this happens, the rational
fraction value is computed as a floating point value
and stored inside the rephasor.

#+NAME: gestvm
#+BEGIN_SRC c
gestvm_rephasor rephasor;


@@ 683,6 695,8 @@ int num, den;
int update_rephasor;
#+END_SRC

These values are initialized below:

#+NAME: init
#+BEGIN_SRC c
gestvm_rephasor_init(&gvm->rephasor);