pcm/*: add "noexcept"

This commit is contained in:
Max Kellermann
2018-01-01 19:07:33 +01:00
parent 10537c5095
commit 3bb9c704de
35 changed files with 123 additions and 120 deletions
+7 -7
View File
@@ -35,7 +35,7 @@ template<SampleFormat F, class Traits=SampleTraits<F>>
static inline typename Traits::value_type
pcm_volume_sample(PcmDither &dither,
typename Traits::value_type _sample,
int volume)
int volume) noexcept
{
typename Traits::long_type sample(_sample);
@@ -50,7 +50,7 @@ pcm_volume_change(PcmDither &dither,
typename Traits::pointer_type dest,
typename Traits::const_pointer_type src,
size_t n,
int volume)
int volume) noexcept
{
for (size_t i = 0; i != n; ++i)
dest[i] = pcm_volume_sample<F, Traits>(dither, src[i], volume);
@@ -59,7 +59,7 @@ pcm_volume_change(PcmDither &dither,
static void
pcm_volume_change_8(PcmDither &dither,
int8_t *dest, const int8_t *src, size_t n,
int volume)
int volume) noexcept
{
pcm_volume_change<SampleFormat::S8>(dither, dest, src, n, volume);
}
@@ -67,7 +67,7 @@ pcm_volume_change_8(PcmDither &dither,
static void
pcm_volume_change_16(PcmDither &dither,
int16_t *dest, const int16_t *src, size_t n,
int volume)
int volume) noexcept
{
pcm_volume_change<SampleFormat::S16>(dither, dest, src, n, volume);
}
@@ -75,7 +75,7 @@ pcm_volume_change_16(PcmDither &dither,
static void
pcm_volume_change_24(PcmDither &dither,
int32_t *dest, const int32_t *src, size_t n,
int volume)
int volume) noexcept
{
pcm_volume_change<SampleFormat::S24_P32>(dither, dest, src, n,
volume);
@@ -84,14 +84,14 @@ pcm_volume_change_24(PcmDither &dither,
static void
pcm_volume_change_32(PcmDither &dither,
int32_t *dest, const int32_t *src, size_t n,
int volume)
int volume) noexcept
{
pcm_volume_change<SampleFormat::S32>(dither, dest, src, n, volume);
}
static void
pcm_volume_change_float(float *dest, const float *src, size_t n,
float volume)
float volume) noexcept
{
for (size_t i = 0; i != n; ++i)
dest[i] = src[i] * volume;