decoder/Bridge: add noexcept

This commit is contained in:
Max Kellermann
2019-07-05 08:35:39 +02:00
parent 94c9fafe16
commit 4650a903b4
8 changed files with 25 additions and 16 deletions

View File

@@ -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 ||

View File

@@ -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,

View File

@@ -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