File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -993,17 +993,17 @@ class ChannelAvgT : public BaseConverter {
993993 * @ingroup convert
994994 * @tparam T
995995 */
996- template <typename T = int16_t >
996+ template <typename T = int16_t , typename SumT = float >
997997class ChannelMixer : public BaseConverter {
998998 public:
999999 ChannelMixer (int channels = 2 ) { this ->channels = channels; }
1000- size_t convert (uint8_t *target, uint8_t *src , size_t size) {
1001- T *srcT = (T *)src ;
1002- T *targetT = (T *)target ;
1000+ size_t convert (uint8_t *data , size_t size) {
1001+ T *srcT = (T *)data ;
1002+ T *targetT = (T *)data ;
10031003 int samples = size / sizeof (T);
10041004 assert (samples % channels == 0 );
10051005 for (int j = 0 ; j < samples; j += channels) {
1006- float sum = 0 ;
1006+ SumT sum = 0 ;
10071007 for (int ch = 0 ; ch < channels; ch++) {
10081008 sum += srcT[j + ch];
10091009 }
You can’t perform that action at this time.
0 commit comments