encoder/Interface: add noexcept

This commit is contained in:
Max Kellermann
2019-07-04 22:44:36 +02:00
parent 07080574a2
commit 8480b834b3
9 changed files with 45 additions and 45 deletions

View File

@@ -48,14 +48,14 @@ class ShineEncoder final : public Encoder {
DynamicFifoBuffer<uint8_t> output_buffer;
public:
ShineEncoder(AudioFormat _audio_format, shine_t _shine)
ShineEncoder(AudioFormat _audio_format, shine_t _shine) noexcept
:Encoder(false),
audio_format(_audio_format), shine(_shine),
frame_size(shine_samples_per_pass(shine)),
stereo{new int16_t[frame_size], new int16_t[frame_size]},
output_buffer(BUFFER_INIT_SIZE) {}
~ShineEncoder() override {
~ShineEncoder() noexcept override {
if (input_pos > SHINE_MAX_SAMPLES) {
/* write zero chunk */
input_pos = 0;
@@ -78,7 +78,7 @@ public:
void Write(const void *data, size_t length) override;
size_t Read(void *dest, size_t length) override {
size_t Read(void *dest, size_t length) noexcept override {
return output_buffer.Read((uint8_t *)dest, length);
}
};
@@ -92,7 +92,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
const char *GetMimeType() const override {
const char *GetMimeType() const noexcept override {
return "audio/mpeg";
}
};