pcm/*: add "noexcept"
This commit is contained in:
+11
-11
@@ -33,7 +33,7 @@
|
||||
|
||||
template<typename D, typename S>
|
||||
static void
|
||||
MonoToStereo(D dest, S src, S end)
|
||||
MonoToStereo(D dest, S src, S end) noexcept
|
||||
{
|
||||
while (src != end) {
|
||||
const auto value = *src++;
|
||||
@@ -47,7 +47,7 @@ MonoToStereo(D dest, S src, S end)
|
||||
template<SampleFormat F, class Traits=SampleTraits<F>>
|
||||
static typename Traits::value_type
|
||||
StereoToMono(typename Traits::value_type _a,
|
||||
typename Traits::value_type _b)
|
||||
typename Traits::value_type _b) noexcept
|
||||
{
|
||||
typename Traits::sum_type a(_a);
|
||||
typename Traits::sum_type b(_b);
|
||||
@@ -59,7 +59,7 @@ template<SampleFormat F, class Traits=SampleTraits<F>>
|
||||
static typename Traits::pointer_type
|
||||
StereoToMono(typename Traits::pointer_type dest,
|
||||
typename Traits::const_pointer_type src,
|
||||
typename Traits::const_pointer_type end)
|
||||
typename Traits::const_pointer_type end) noexcept
|
||||
{
|
||||
while (src != end) {
|
||||
const auto a = *src++;
|
||||
@@ -76,7 +76,7 @@ static typename Traits::pointer_type
|
||||
NToStereo(typename Traits::pointer_type dest,
|
||||
unsigned src_channels,
|
||||
typename Traits::const_pointer_type src,
|
||||
typename Traits::const_pointer_type end)
|
||||
typename Traits::const_pointer_type end) noexcept
|
||||
{
|
||||
assert((end - src) % src_channels == 0);
|
||||
|
||||
@@ -105,7 +105,7 @@ static typename Traits::pointer_type
|
||||
StereoToN(typename Traits::pointer_type dest,
|
||||
unsigned dest_channels,
|
||||
typename Traits::const_pointer_type src,
|
||||
typename Traits::const_pointer_type end)
|
||||
typename Traits::const_pointer_type end) noexcept
|
||||
{
|
||||
assert(dest_channels > 2);
|
||||
assert((end - src) % 2 == 0);
|
||||
@@ -133,7 +133,7 @@ NToM(typename Traits::pointer_type dest,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
typename Traits::const_pointer_type src,
|
||||
typename Traits::const_pointer_type end)
|
||||
typename Traits::const_pointer_type end) noexcept
|
||||
{
|
||||
assert((end - src) % src_channels == 0);
|
||||
|
||||
@@ -157,7 +157,7 @@ static ConstBuffer<typename Traits::value_type>
|
||||
ConvertChannels(PcmBuffer &buffer,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
ConstBuffer<typename Traits::value_type> src)
|
||||
ConstBuffer<typename Traits::value_type> src) noexcept
|
||||
{
|
||||
assert(src.size % src_channels == 0);
|
||||
|
||||
@@ -184,7 +184,7 @@ ConstBuffer<int16_t>
|
||||
pcm_convert_channels_16(PcmBuffer &buffer,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
ConstBuffer<int16_t> src)
|
||||
ConstBuffer<int16_t> src) noexcept
|
||||
{
|
||||
return ConvertChannels<SampleFormat::S16>(buffer, dest_channels,
|
||||
src_channels, src);
|
||||
@@ -194,7 +194,7 @@ ConstBuffer<int32_t>
|
||||
pcm_convert_channels_24(PcmBuffer &buffer,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
ConstBuffer<int32_t> src)
|
||||
ConstBuffer<int32_t> src) noexcept
|
||||
{
|
||||
return ConvertChannels<SampleFormat::S24_P32>(buffer, dest_channels,
|
||||
src_channels, src);
|
||||
@@ -204,7 +204,7 @@ ConstBuffer<int32_t>
|
||||
pcm_convert_channels_32(PcmBuffer &buffer,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
ConstBuffer<int32_t> src)
|
||||
ConstBuffer<int32_t> src) noexcept
|
||||
{
|
||||
return ConvertChannels<SampleFormat::S32>(buffer, dest_channels,
|
||||
src_channels, src);
|
||||
@@ -214,7 +214,7 @@ ConstBuffer<float>
|
||||
pcm_convert_channels_float(PcmBuffer &buffer,
|
||||
unsigned dest_channels,
|
||||
unsigned src_channels,
|
||||
ConstBuffer<float> src)
|
||||
ConstBuffer<float> src) noexcept
|
||||
{
|
||||
return ConvertChannels<SampleFormat::FLOAT>(buffer, dest_channels,
|
||||
src_channels, src);
|
||||
|
||||
Reference in New Issue
Block a user