aboutsummaryrefslogtreecommitdiffstats
path: root/src/PcmMix.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-02-01 13:50:10 +0100
committerMax Kellermann <max@duempel.org>2013-02-01 14:10:27 +0100
commitef99d6ce3d9b82cb249ae08b390049a6f9cd9d56 (patch)
tree7e41014940911702613ee76f7305a2e4d0724f8c /src/PcmMix.cxx
parent0ac06d77f1d47398808935418153a14d1d858860 (diff)
downloadmpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.tar.gz
mpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.tar.xz
mpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.zip
PcmUtils: remove pcm_range(), use PcmClamp() instead
Diffstat (limited to 'src/PcmMix.cxx')
-rw-r--r--src/PcmMix.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/PcmMix.cxx b/src/PcmMix.cxx
index 4f8f3882c..79a3ba645 100644
--- a/src/PcmMix.cxx
+++ b/src/PcmMix.cxx
@@ -37,7 +37,7 @@ pcm_add_vol_8(int8_t *buffer1, const int8_t *buffer2,
pcm_volume_dither() + PCM_VOLUME_1 / 2)
/ PCM_VOLUME_1;
- *buffer1++ = pcm_range(sample1, 8);
+ *buffer1++ = PcmClamp<int8_t, int32_t, 8>(sample1);
--num_samples;
}
}
@@ -54,7 +54,7 @@ pcm_add_vol_16(int16_t *buffer1, const int16_t *buffer2,
pcm_volume_dither() + PCM_VOLUME_1 / 2)
/ PCM_VOLUME_1;
- *buffer1++ = pcm_range(sample1, 16);
+ *buffer1++ = PcmClamp<int16_t, int32_t, 16>(sample1);
--num_samples;
}
}
@@ -71,7 +71,7 @@ pcm_add_vol_24(int32_t *buffer1, const int32_t *buffer2,
pcm_volume_dither() + PCM_VOLUME_1 / 2)
/ PCM_VOLUME_1;
- *buffer1++ = pcm_range(sample1, 24);
+ *buffer1++ = PcmClamp<int32_t, int64_t, 24>(sample1);
--num_samples;
}
}
@@ -88,7 +88,7 @@ pcm_add_vol_32(int32_t *buffer1, const int32_t *buffer2,
pcm_volume_dither() + PCM_VOLUME_1 / 2)
/ PCM_VOLUME_1;
- *buffer1++ = pcm_range_64(sample1, 32);
+ *buffer1++ = PcmClamp<int32_t, int64_t, 32>(sample1);
--num_samples;
}
}
@@ -160,7 +160,7 @@ pcm_add_8(int8_t *buffer1, const int8_t *buffer2, unsigned num_samples)
sample1 += sample2;
- *buffer1++ = pcm_range(sample1, 8);
+ *buffer1++ = PcmClamp<int8_t, int32_t, 8>(sample1);
--num_samples;
}
}
@@ -174,7 +174,7 @@ pcm_add_16(int16_t *buffer1, const int16_t *buffer2, unsigned num_samples)
sample1 += sample2;
- *buffer1++ = pcm_range(sample1, 16);
+ *buffer1++ = PcmClamp<int16_t, int32_t, 16>(sample1);
--num_samples;
}
}
@@ -188,7 +188,7 @@ pcm_add_24(int32_t *buffer1, const int32_t *buffer2, unsigned num_samples)
sample1 += sample2;
- *buffer1++ = pcm_range(sample1, 24);
+ *buffer1++ = PcmClamp<int32_t, int64_t, 24>(sample1);
--num_samples;
}
}
@@ -202,7 +202,7 @@ pcm_add_32(int32_t *buffer1, const int32_t *buffer2, unsigned num_samples)
sample1 += sample2;
- *buffer1++ = pcm_range_64(sample1, 32);
+ *buffer1++ = PcmClamp<int32_t, int64_t, 32>(sample1);
--num_samples;
}
}