encoder/Interface: add noexcept
This commit is contained in:
@@ -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";
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user