That's odd, why would the volume be halved in stereo?

Even if this is correct, divisions by a non-fixed number are expensive (especially on ARM) so it would be good to split the loop in two: 

    if (channelsNum == 1)  {  for (...) {do the old way}  } else {  for (...) {   divide by 2 here  } } .