| 64 | |
| 65 | |
| 66 | float WaveMix::mix(float s1, float s2) |
| 67 | { |
| 68 | float total = 0; |
| 69 | if (_gain == 0) return 0; |
| 70 | if (_weight[0] != 0) total += (_weight[0] * s1); |
| 71 | if (_weight[1] != 0) total += (_weight[1] * s2); |
| 72 | total *= _gain; |
| 73 | if (_offset != 0) total += _offset; |
| 74 | return total; |
| 75 | } |
| 76 | |
| 77 | |
| 78 | // -- END OF FILE -- |