Advertisement
rghvdberg

lazy mans mixer

Aug 13th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. void Mixer::add_Sample(float s)
  2. {
  3.     mix +=s;
  4.     ++channels;
  5. }
  6.  
  7. float Mixer::get_Mix()
  8. {
  9.     average = mix/channels;
  10.     mix = 0;
  11.     channels = 0;
  12.     return average;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement