diff --git a/src/command/FingerprintCommands.cxx b/src/command/FingerprintCommands.cxx index 30599ec99..460275afe 100644 --- a/src/command/FingerprintCommands.cxx +++ b/src/command/FingerprintCommands.cxx @@ -83,7 +83,8 @@ private: /* virtual methods from class DecoderClient */ InputStreamPtr OpenUri(const char *uri) override; - size_t Read(InputStream &is, void *buffer, size_t length) override; + size_t Read(InputStream &is, + void *buffer, size_t length) noexcept override; /* virtual methods from class InputStreamHandler */ void OnInputStreamReady() noexcept override { @@ -285,7 +286,8 @@ GetChromaprintCommand::OpenUri(const char *uri2) } size_t -GetChromaprintCommand::Read(InputStream &is, void *buffer, size_t length) +GetChromaprintCommand::Read(InputStream &is, + void *buffer, size_t length) noexcept { /* overriding ChromaprintDecoderClient's implementation to make it cancellable */ diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx index 315aef574..6d39efd7d 100644 --- a/src/decoder/Bridge.cxx +++ b/src/decoder/Bridge.cxx @@ -255,7 +255,7 @@ DecoderBridge::UpdateStreamTag(InputStream *is) noexcept void DecoderBridge::Ready(const AudioFormat audio_format, - bool seekable, SignedSongTime duration) + bool seekable, SignedSongTime duration) noexcept { assert(convert == nullptr); assert(stream_tag == nullptr); @@ -401,7 +401,7 @@ DecoderBridge::OpenUri(const char *uri) } size_t -DecoderBridge::Read(InputStream &is, void *buffer, size_t length) +DecoderBridge::Read(InputStream &is, void *buffer, size_t length) noexcept try { assert(buffer != nullptr); assert(dc.state == DecoderState::START || diff --git a/src/decoder/Bridge.hxx b/src/decoder/Bridge.hxx index 3814d7a42..e93cb6097 100644 --- a/src/decoder/Bridge.hxx +++ b/src/decoder/Bridge.hxx @@ -161,14 +161,15 @@ public: /* virtual methods from DecoderClient */ void Ready(AudioFormat audio_format, - bool seekable, SignedSongTime duration) override; + bool seekable, SignedSongTime duration) noexcept override; DecoderCommand GetCommand() noexcept override; void CommandFinished() noexcept override; SongTime GetSeekTime() noexcept override; uint64_t GetSeekFrame() noexcept override; void SeekError() noexcept override; InputStreamPtr OpenUri(const char *uri) override; - size_t Read(InputStream &is, void *buffer, size_t length) override; + size_t Read(InputStream &is, + void *buffer, size_t length) noexcept override; void SubmitTimestamp(FloatDuration t) noexcept override; DecoderCommand SubmitData(InputStream *is, const void *data, size_t length, diff --git a/src/decoder/Client.hxx b/src/decoder/Client.hxx index e8bcef213..eab1a5dba 100644 --- a/src/decoder/Client.hxx +++ b/src/decoder/Client.hxx @@ -48,7 +48,8 @@ public: * unknown */ virtual void Ready(AudioFormat audio_format, - bool seekable, SignedSongTime duration) = 0; + bool seekable, + SignedSongTime duration) noexcept = 0; /** * Determines the pending decoder command. @@ -106,7 +107,8 @@ public: * @return the number of bytes read, or 0 if one of the following * occurs: end of file; error; command (like SEEK or STOP). */ - virtual size_t Read(InputStream &is, void *buffer, size_t length) = 0; + virtual size_t Read(InputStream &is, + void *buffer, size_t length) noexcept = 0; /** * Sets the time stamp for the next data chunk [seconds]. The MPD diff --git a/src/lib/chromaprint/DecoderClient.cxx b/src/lib/chromaprint/DecoderClient.cxx index 262551709..75f1f87cc 100644 --- a/src/lib/chromaprint/DecoderClient.cxx +++ b/src/lib/chromaprint/DecoderClient.cxx @@ -44,7 +44,8 @@ ChromaprintDecoderClient::Finish() } void -ChromaprintDecoderClient::Ready(AudioFormat audio_format, bool, SignedSongTime) +ChromaprintDecoderClient::Ready(AudioFormat audio_format, bool, + SignedSongTime) noexcept { /* feed the first two minutes into libchromaprint */ remaining_bytes = audio_format.TimeToSize(std::chrono::minutes(2)); @@ -87,7 +88,8 @@ ChromaprintDecoderClient::SubmitData(InputStream *, } size_t -ChromaprintDecoderClient::Read(InputStream &is, void *buffer, size_t length) +ChromaprintDecoderClient::Read(InputStream &is, + void *buffer, size_t length) noexcept { try { return is.LockRead(buffer, length); diff --git a/src/lib/chromaprint/DecoderClient.hxx b/src/lib/chromaprint/DecoderClient.hxx index 107b623c1..9d32b956c 100644 --- a/src/lib/chromaprint/DecoderClient.hxx +++ b/src/lib/chromaprint/DecoderClient.hxx @@ -68,7 +68,7 @@ public: /* virtual methods from DecoderClient */ void Ready(AudioFormat audio_format, - bool seekable, SignedSongTime duration) override; + bool seekable, SignedSongTime duration) noexcept override; DecoderCommand GetCommand() noexcept override { return !error && remaining_bytes > 0 @@ -90,7 +90,8 @@ public: //InputStreamPtr OpenUri(const char *) override; - size_t Read(InputStream &is, void *buffer, size_t length) override; + size_t Read(InputStream &is, + void *buffer, size_t length) noexcept override; void SubmitTimestamp(FloatDuration) noexcept override {} DecoderCommand SubmitData(InputStream *is, diff --git a/test/DumpDecoderClient.cxx b/test/DumpDecoderClient.cxx index d7668f6a4..495e8f3a5 100644 --- a/test/DumpDecoderClient.cxx +++ b/test/DumpDecoderClient.cxx @@ -29,7 +29,7 @@ void DumpDecoderClient::Ready(const AudioFormat audio_format, gcc_unused bool seekable, - SignedSongTime duration) + SignedSongTime duration) noexcept { assert(!initialized); assert(audio_format.IsValid()); @@ -76,7 +76,7 @@ DumpDecoderClient::OpenUri(const char *uri) } size_t -DumpDecoderClient::Read(InputStream &is, void *buffer, size_t length) +DumpDecoderClient::Read(InputStream &is, void *buffer, size_t length) noexcept { try { return is.LockRead(buffer, length); diff --git a/test/DumpDecoderClient.hxx b/test/DumpDecoderClient.hxx index 630b0fc0d..8c95802d2 100644 --- a/test/DumpDecoderClient.hxx +++ b/test/DumpDecoderClient.hxx @@ -41,14 +41,15 @@ public: /* virtual methods from DecoderClient */ void Ready(AudioFormat audio_format, - bool seekable, SignedSongTime duration) override; + bool seekable, SignedSongTime duration) noexcept override; DecoderCommand GetCommand() noexcept override; void CommandFinished() noexcept override; SongTime GetSeekTime() noexcept override; uint64_t GetSeekFrame() noexcept override; void SeekError() noexcept override; InputStreamPtr OpenUri(const char *uri) override; - size_t Read(InputStream &is, void *buffer, size_t length) override; + size_t Read(InputStream &is, + void *buffer, size_t length) noexcept override; void SubmitTimestamp(FloatDuration t) noexcept override; DecoderCommand SubmitData(InputStream *is, const void *data, size_t length,