Commit dc7c6bd1 authored by Max Kellermann's avatar Max Kellermann

pack the struct audio_format

Due to clumsy layout, the audio_format struct took 12 bytes. Move the "channels" to the end, so it can be merged into the same 32 bit slot as "bits", which reduces the struct size to 8 bytes.
parent f1dd9c20
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
#include "mpd_types.h" #include "mpd_types.h"
struct audio_format { struct audio_format {
mpd_sint8 channels;
mpd_uint32 sampleRate; mpd_uint32 sampleRate;
mpd_sint8 bits; mpd_sint8 bits;
mpd_sint8 channels;
}; };
static inline double audio_format_time_to_size(const struct audio_format *af) static inline double audio_format_time_to_size(const struct audio_format *af)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment