diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-20 20:27:44 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-12-21 10:25:38 +0100 |
commit | 994c9a01e327c6ef379ff7ea7530321d3bdfe0fd (patch) | |
tree | 94f644e38ef0274904ca2472d29c2697af928350 /src/player | |
parent | ad1d5e824808c92b77660f557860f02caa642fe1 (diff) |
player/Control: reorder attributes to reduce padding
Diffstat (limited to 'src/player')
-rw-r--r-- | src/player/Control.hxx | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/src/player/Control.hxx b/src/player/Control.hxx index 980144957..2eae62313 100644 --- a/src/player/Control.hxx +++ b/src/player/Control.hxx @@ -141,11 +141,6 @@ struct PlayerControl final : AudioOutputClient { */ Cond client_cond; - PlayerCommand command = PlayerCommand::NONE; - PlayerState state = PlayerState::STOP; - - PlayerError error_type = PlayerError::NONE; - /** * The error that occurred in the player thread. This * attribute is only valid if #error_type is not @@ -155,6 +150,14 @@ struct PlayerControl final : AudioOutputClient { std::exception_ptr error; /** + * The next queued song. + * + * This is a duplicate, and must be freed when this attribute + * is cleared. + */ + std::unique_ptr<DetachedSong> next_song; + + /** * A copy of the current #DetachedSong after its tags have * been updated by the decoder (for example, a radio stream * that has sent a new tag after switching to the next song). @@ -166,28 +169,13 @@ struct PlayerControl final : AudioOutputClient { */ std::unique_ptr<DetachedSong> tagged_song; - uint16_t bit_rate; - AudioFormat audio_format; - SignedSongTime total_time; - SongTime elapsed_time; - - /** - * The next queued song. - * - * This is a duplicate, and must be freed when this attribute - * is cleared. - */ - std::unique_ptr<DetachedSong> next_song; - - SongTime seek_time; + PlayerCommand command = PlayerCommand::NONE; + PlayerState state = PlayerState::STOP; - CrossFadeSettings cross_fade; + PlayerError error_type = PlayerError::NONE; - const ReplayGainConfig replay_gain_config; ReplayGainMode replay_gain_mode = ReplayGainMode::OFF; - double total_play_time = 0; - /** * If this flag is set, then the player will be auto-paused at * the end of the song, before the next song starts to play. @@ -197,6 +185,20 @@ struct PlayerControl final : AudioOutputClient { */ bool border_pause = false; + AudioFormat audio_format; + uint16_t bit_rate; + + SignedSongTime total_time; + SongTime elapsed_time; + + SongTime seek_time; + + CrossFadeSettings cross_fade; + + const ReplayGainConfig replay_gain_config; + + double total_play_time = 0; + PlayerControl(PlayerListener &_listener, MultipleOutputs &_outputs, unsigned buffer_chunks, |