diff --git a/src/pcm/Dsd16.cxx b/src/pcm/Dsd16.cxx index 774a51ecc..5617bb04d 100644 --- a/src/pcm/Dsd16.cxx +++ b/src/pcm/Dsd16.cxx @@ -26,7 +26,7 @@ * Construct a 16 bit integer from two bytes. */ static constexpr inline uint16_t -Construct16(uint8_t a, uint8_t b) +Construct16(uint8_t a, uint8_t b) noexcept { /* "a" is the oldest byte, which must be in the most significant byte */ @@ -35,13 +35,14 @@ Construct16(uint8_t a, uint8_t b) } static constexpr inline uint16_t -Dsd8To16Sample(const uint8_t *src, unsigned channels) +Dsd8To16Sample(const uint8_t *src, unsigned channels) noexcept { return Construct16(src[0], src[channels]); } ConstBuffer -Dsd8To16(PcmBuffer &buffer, unsigned channels, ConstBuffer _src) +Dsd8To16(PcmBuffer &buffer, unsigned channels, + ConstBuffer _src) noexcept { const size_t in_frames = _src.size / channels; const size_t out_frames = in_frames / 2; diff --git a/src/pcm/Dsd16.hxx b/src/pcm/Dsd16.hxx index 47341868b..f9791cc2b 100644 --- a/src/pcm/Dsd16.hxx +++ b/src/pcm/Dsd16.hxx @@ -31,6 +31,7 @@ class PcmBuffer; * Convert DSD_U8 to DSD_U16 (native endian, oldest bits in MSB). */ ConstBuffer -Dsd8To16(PcmBuffer &buffer, unsigned channels, ConstBuffer src); +Dsd8To16(PcmBuffer &buffer, unsigned channels, + ConstBuffer src) noexcept; #endif diff --git a/src/pcm/Dsd32.cxx b/src/pcm/Dsd32.cxx index 1e619efa7..da5f5c3a7 100644 --- a/src/pcm/Dsd32.cxx +++ b/src/pcm/Dsd32.cxx @@ -26,7 +26,7 @@ * Construct a 32 bit integer from four bytes. */ static constexpr inline uint32_t -Construct32(uint8_t a, uint8_t b, uint8_t c, uint8_t d) +Construct32(uint8_t a, uint8_t b, uint8_t c, uint8_t d) noexcept { /* "a" is the oldest byte, which must be in the most significant byte */ @@ -36,14 +36,15 @@ Construct32(uint8_t a, uint8_t b, uint8_t c, uint8_t d) } static constexpr inline uint32_t -Dsd8To32Sample(const uint8_t *src, unsigned channels) +Dsd8To32Sample(const uint8_t *src, unsigned channels) noexcept { return Construct32(src[0], src[channels], src[2 * channels], src[3 * channels]); } ConstBuffer -Dsd8To32(PcmBuffer &buffer, unsigned channels, ConstBuffer _src) +Dsd8To32(PcmBuffer &buffer, unsigned channels, + ConstBuffer _src) noexcept { const size_t in_frames = _src.size / channels; const size_t out_frames = in_frames / 4; diff --git a/src/pcm/Dsd32.hxx b/src/pcm/Dsd32.hxx index 5f68814f4..e3d1bdd6d 100644 --- a/src/pcm/Dsd32.hxx +++ b/src/pcm/Dsd32.hxx @@ -31,6 +31,7 @@ class PcmBuffer; * Convert DSD_U8 to DSD_U32 (native endian, oldest bits in MSB). */ ConstBuffer -Dsd8To32(PcmBuffer &buffer, unsigned channels, ConstBuffer src); +Dsd8To32(PcmBuffer &buffer, unsigned channels, + ConstBuffer src) noexcept; #endif