MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / mix

Method mix

libraries/WaveMix/WaveMix.cpp:66–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65
66float 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 --

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64