player/Control: reorder attributes to reduce padding
This commit is contained in:
@@ -141,11 +141,6 @@ struct PlayerControl final : AudioOutputClient {
|
|||||||
*/
|
*/
|
||||||
Cond client_cond;
|
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
|
* The error that occurred in the player thread. This
|
||||||
* attribute is only valid if #error_type is not
|
* attribute is only valid if #error_type is not
|
||||||
@@ -154,6 +149,14 @@ struct PlayerControl final : AudioOutputClient {
|
|||||||
*/
|
*/
|
||||||
std::exception_ptr error;
|
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
|
* A copy of the current #DetachedSong after its tags have
|
||||||
* been updated by the decoder (for example, a radio stream
|
* been updated by the decoder (for example, a radio stream
|
||||||
@@ -166,28 +169,13 @@ struct PlayerControl final : AudioOutputClient {
|
|||||||
*/
|
*/
|
||||||
std::unique_ptr<DetachedSong> tagged_song;
|
std::unique_ptr<DetachedSong> tagged_song;
|
||||||
|
|
||||||
uint16_t bit_rate;
|
PlayerCommand command = PlayerCommand::NONE;
|
||||||
AudioFormat audio_format;
|
PlayerState state = PlayerState::STOP;
|
||||||
SignedSongTime total_time;
|
|
||||||
SongTime elapsed_time;
|
|
||||||
|
|
||||||
/**
|
PlayerError error_type = PlayerError::NONE;
|
||||||
* 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;
|
|
||||||
|
|
||||||
CrossFadeSettings cross_fade;
|
|
||||||
|
|
||||||
const ReplayGainConfig replay_gain_config;
|
|
||||||
ReplayGainMode replay_gain_mode = ReplayGainMode::OFF;
|
ReplayGainMode replay_gain_mode = ReplayGainMode::OFF;
|
||||||
|
|
||||||
double total_play_time = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this flag is set, then the player will be auto-paused at
|
* 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.
|
* the end of the song, before the next song starts to play.
|
||||||
@@ -197,6 +185,20 @@ struct PlayerControl final : AudioOutputClient {
|
|||||||
*/
|
*/
|
||||||
bool border_pause = false;
|
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,
|
PlayerControl(PlayerListener &_listener,
|
||||||
MultipleOutputs &_outputs,
|
MultipleOutputs &_outputs,
|
||||||
unsigned buffer_chunks,
|
unsigned buffer_chunks,
|
||||||
|
Reference in New Issue
Block a user