Howto:Add sound effects to aircraft: Difference between revisions

Jump to navigation Jump to search
Code sample did not match sim gear source code.
m (→‎Configuration tags: Forgot to test the offset, is fixed now)
(Code sample did not match sim gear source code.)
Line 313: Line 313:
         value += offset[n] - abs(factor[n]) * function(property[n]);
         value += offset[n] - abs(factor[n]) * function(property[n]);
     } else {
     } else {
         value += factor[n] * function(property[n]);
         value *= factor[n] * function(property[n]);
         offs += offset[n];
         offs += offset[n];
     }
     }
Line 319: Line 319:


volume = offs + value;
volume = offs + value;
if (volume > 1.0) vol = 1.0;
</syntaxhighlight>
</syntaxhighlight>
where function can be one of: lin, ln, log, inv, abs or sqrt
where function can be one of: lin, ln, log, inv, abs or sqrt
252

edits

Navigation menu