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

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

View File

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