From f97a9ce765436b35a539f01059b04ec31ffa7c4c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Jun 2019 11:49:16 +0200 Subject: [PATCH] Revert "MusicChunk: pad MusicChunkInfo to a multiple of 8 bytes" This reverts commit 2c3eeb7194b4871ed7227a2c0b7bfae90b05d17f. This workaround has been obsoleted by commits bf26adf55546771e92fcfd2cc192c70c7eb5f1cd and 32380d1db046dc596e9f8198d22050b2beab8a41 --- src/MusicChunk.hxx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/MusicChunk.hxx b/src/MusicChunk.hxx index 0be7ef838..8cc5e1539 100644 --- a/src/MusicChunk.hxx +++ b/src/MusicChunk.hxx @@ -43,15 +43,7 @@ struct MusicChunk; /** * Meta information for #MusicChunk. */ -struct alignas(8) MusicChunkInfo { - /* align to multiple of 8 bytes, which adds padding at the - end, so the size of MusicChunk::data is also a multiple of - 8 bytes; this is a workaround for a bug in the DSD_U32 and - DoP converters which require processing 8 bytes at a time, - discarding the remainder */ - /* TODO: once all converters have been fixed, we should remove - this workaround */ - +struct MusicChunkInfo { /** the next chunk in a linked list */ MusicChunkPtr next; @@ -127,10 +119,6 @@ struct MusicChunk : MusicChunkInfo { /** the data (probably PCM) */ uint8_t data[CHUNK_SIZE - sizeof(MusicChunkInfo)]; - /* TODO: remove this check once all converters have been fixed - (see comment in struct MusicChunkInfo for details) */ - static_assert(sizeof(data) % 8 == 0, "Wrong alignment"); - /** * Prepares appending to the music chunk. Returns a buffer * where you may write into. After you are finished, call