4. Sample Accuracy

FTable lists can support sample accurate changes for ftable changes that occur once per block. This is done by keeping track of the index position in the block where the change happens. From then on, any samples before the block position use the previously selected entry found in prev, and then the next entry anything at or after the block position.

<<sp_ftlist>>=
int blockpos;
int prev, next;

The blockpos, prev, and next values are all set to be negative as indicator that they are uninitialized or unset.

A negative blockpos value indicates that no switch has occured, and to use the next value. If both prev and next are negative, the target ftable is used as a fallback.

<<init>>=
ftl->blockpos = -1;
ftl->next = -1;
ftl->prev = -1;

In order for this kind of sample accuracy to work, the ftlist must be reset at the beginning of each loop (presumably inside of a node controlling it, such as the sample tchoose node provided).

A reset can be done with sp_ftlist_reset.

<<funcdefs>>=
void sp_ftlist_reset(sp_ftlist *ftlst);

A reset will clear any block positions set in the previous block. It will also update the prev and next values.

<<funcs>>=
void sp_ftlist_reset(sp_ftlist *ftlst)
{
    ftlst->blockpos = -1;
    ftlst->prev = ftlst->next;
}



prev | home | next