summaryrefslogtreecommitdiff
path: root/src/pcm/PcmExport.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-08 14:44:49 +0200
committerMax Kellermann <max@musicpd.org>2017-05-08 14:44:49 +0200
commit71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch)
treee9c2f66fbef231858f46d878864199d46e6ce21c /src/pcm/PcmExport.cxx
parentac2e4e593d407e41db49fdb9ae2da6bc1557f618 (diff)
*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to consider these functions throwing.
Diffstat (limited to 'src/pcm/PcmExport.cxx')
-rw-r--r--src/pcm/PcmExport.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx
index fce50a4f3..1054dba4c 100644
--- a/src/pcm/PcmExport.cxx
+++ b/src/pcm/PcmExport.cxx
@@ -84,7 +84,7 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels,
}
size_t
-PcmExport::GetFrameSize(const AudioFormat &audio_format) const
+PcmExport::GetFrameSize(const AudioFormat &audio_format) const noexcept
{
if (pack24)
/* packed 24 bit samples (3 bytes per sample) */
@@ -109,7 +109,7 @@ PcmExport::GetFrameSize(const AudioFormat &audio_format) const
}
unsigned
-PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const
+PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const noexcept
{
#ifdef ENABLE_DSD
if (dsd_u16)
@@ -132,7 +132,7 @@ PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const
}
unsigned
-PcmExport::Params::CalcInputSampleRate(unsigned sample_rate) const
+PcmExport::Params::CalcInputSampleRate(unsigned sample_rate) const noexcept
{
#ifdef ENABLE_DSD
if (dsd_u16)
@@ -209,7 +209,7 @@ PcmExport::Export(ConstBuffer<void> data)
}
size_t
-PcmExport::CalcSourceSize(size_t size) const
+PcmExport::CalcSourceSize(size_t size) const noexcept
{
if (pack24)
/* 32 bit to 24 bit conversion (4 to 3 bytes) */