- get_prev_auto(position, PLAY_FORWARD, begin, 1);
- get_next_auto(position, PLAY_FORWARD, end, 1);
-
- double weight = 0.0;
- if(end->position != begin->position)
- weight = (double)(position - begin->position) / (end->position - begin->position);
-
- int result = (int)((double)((MaskAuto*)begin)->value * (1.0 - weight) +
- (double)((MaskAuto*)end)->value * weight + 0.5);
-// printf("MaskAutos::get_value %d %d %f %d %f %d\n",
-// __LINE__,
-// ((MaskAuto*)begin)->value,
-// 1.0 - weight,
-// ((MaskAuto*)end)->value,
-// weight,
-// result);
+ double result = prev_mask->fader * (1-weight) + next_mask->fader*weight;
+// printf("MaskAutos::get_fader %d %d %d %f %d %f %d\n", __LINE__, i,
+// ((MaskAuto*)begin)->fader, 1.0 - weight, ((MaskAuto*)end)->fader, weight, result);