From d2371af120cfb03aaa30d5e83f439fdd422f063e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 Feb 2021 19:31:44 +0100 Subject: [PATCH] encoder/wave: add static_assert on sizeof(WaveHeader) --- src/encoder/plugins/WaveEncoderPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/encoder/plugins/WaveEncoderPlugin.cxx b/src/encoder/plugins/WaveEncoderPlugin.cxx index 2f0ccb2f2..53f45d97b 100644 --- a/src/encoder/plugins/WaveEncoderPlugin.cxx +++ b/src/encoder/plugins/WaveEncoderPlugin.cxx @@ -71,6 +71,8 @@ struct WaveHeader { uint32_t data_size; }; +static_assert(sizeof(WaveHeader) == 44); + static constexpr WaveHeader MakeWaveHeader(int channels, int bits, int freq, int block_size) noexcept