MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields | Static Public Attributes
Partition Struct Referencefinal

A partition of the Music Player Daemon. More...

`#include <Partition.hxx>`

Inheritance diagram for Partition:
[legend]
Collaboration diagram for Partition:
[legend]

## Public Member Functions
| Partition (Instance &_instance, unsigned max_length, unsigned buffer_chunks, unsigned buffered_before_play, AudioFormat configured_audio_format, const ReplayGainConfig &replay_gain_config)
void | EmitGlobalEvent (unsigned mask)
void | EmitIdle (unsigned mask)
void | ClearQueue ()
unsigned | AppendURI (const SongLoader &loader, const char *uri_utf8)
void | DeletePosition (unsigned position)
void | DeleteId (unsigned id)
void | DeleteRange (unsigned start, unsigned end)
| Deletes a range of songs from the playlist. More...
void | StaleSong (const char *uri)
void | Shuffle (unsigned start, unsigned end)
void | MoveRange (unsigned start, unsigned end, int to)
void | MoveId (unsigned id, int to)
void | SwapPositions (unsigned song1, unsigned song2)
void | SwapIds (unsigned id1, unsigned id2)
void | SetPriorityRange (unsigned start_position, unsigned end_position, uint8_t priority)
void | SetPriorityId (unsigned song_id, uint8_t priority)
void | Stop ()
void | PlayPosition (int position)
void | PlayId (int id)
void | PlayNext ()
void | PlayPrevious ()
void | SeekSongPosition (unsigned song_position, SongTime seek_time)
void | SeekSongId (unsigned song_id, SongTime seek_time)
void | SeekCurrent (SignedSongTime seek_time, bool relative)
void | SetRepeat (bool new_value)
bool | GetRandom () const
void | SetRandom (bool new_value)
void | SetSingle (bool new_value)
void | SetConsume (bool new_value)
void | SetReplayGainMode (ReplayGainMode mode)
void | UpdateEffectiveReplayGainMode ()
| Publishes the effective ReplayGainMode to all subsystems. More...
void | TagModified ()
| A tag in the play queue has been modified by the player thread. More...
void | SyncWithPlayer ()
| Synchronize the player with the play queue. More...

## Data Fields
Instance & | instance
MaskMonitor | global_events
struct playlist | playlist
MultipleOutputs | outputs
PlayerControl | pc
ReplayGainMode | replay_gain_mode = ReplayGainMode::OFF

## Static Public Attributes
static constexpr unsigned | TAG_MODIFIED = 0x1
static constexpr unsigned | SYNC_WITH_PLAYER = 0x2

## Detailed Description

A partition of the Music Player Daemon.

It is a separate unit with a playlist, a player, outputs etc.

Definition at line 42 of file Partition.hxx.

## Constructor & Destructor Documentation

Partition::Partition | ( | Instance & | _instance,
|  | unsigned | max_length,
|  | unsigned | buffer_chunks,
|  | unsigned | buffered_before_play,
|  | AudioFormat | configured_audio_format,
|  | const ReplayGainConfig & | replay_gain_config
| ) |  |

## Member Function Documentation

unsigned Partition::AppendURI | ( | const SongLoader & | loader,
|  | const char * | uri_utf8
| ) |  |
| inline

Definition at line 75 of file Partition.hxx.

void Partition::ClearQueue | ( |  | ) |
| inline

Definition at line 71 of file Partition.hxx.

void Partition::DeleteId | ( | unsigned | id | ) |
| inline

Definition at line 84 of file Partition.hxx.

void Partition::DeletePosition | ( | unsigned | position | ) |
| inline

Definition at line 80 of file Partition.hxx.

void Partition::DeleteRange | ( | unsigned | start,
|  | unsigned | end
| ) |  |
| inline

Deletes a range of songs from the playlist.

Parameters

  start | the position of the first song to delete
  end | the position after the last song to delete

Definition at line 94 of file Partition.hxx.

void Partition::EmitGlobalEvent | ( | unsigned | mask | ) |
| inline

Definition at line 65 of file Partition.hxx.

void Partition::EmitIdle | ( | unsigned | mask | ) |

bool Partition::GetRandom | ( |  | ) | const
| inline

Definition at line 168 of file Partition.hxx.

void Partition::MoveId | ( | unsigned | id,
|  | int | to
| ) |  |
| inline

Definition at line 110 of file Partition.hxx.

void Partition::MoveRange | ( | unsigned | start,
|  | unsigned | end,
|  | int | to
| ) |  |
| inline

Definition at line 106 of file Partition.hxx.

void Partition::PlayId | ( | int | id | ) |
| inline

Definition at line 140 of file Partition.hxx.

void Partition::PlayNext | ( |  | ) |
| inline

Definition at line 144 of file Partition.hxx.

void Partition::PlayPosition | ( | int | position | ) |
| inline

Definition at line 136 of file Partition.hxx.

void Partition::PlayPrevious | ( |  | ) |
| inline

Definition at line 148 of file Partition.hxx.

void Partition::SeekCurrent | ( | SignedSongTime | seek_time,
|  | bool | relative
| ) |  |
| inline

Definition at line 160 of file Partition.hxx.

void Partition::SeekSongId | ( | unsigned | song_id,
|  | SongTime | seek_time
| ) |  |
| inline

Definition at line 156 of file Partition.hxx.

void Partition::SeekSongPosition | ( | unsigned | song_position,
|  | SongTime | seek_time
| ) |  |
| inline

Definition at line 152 of file Partition.hxx.

void Partition::SetConsume | ( | bool | new_value | ) |
| inline

Definition at line 180 of file Partition.hxx.

void Partition::SetPriorityId | ( | unsigned | song_id,
|  | uint8_t | priority
| ) |  |
| inline

Definition at line 128 of file Partition.hxx.

void Partition::SetPriorityRange | ( | unsigned | start_position,
|  | unsigned | end_position,
|  | uint8_t | priority
| ) |  |
| inline

Definition at line 122 of file Partition.hxx.

void Partition::SetRandom | ( | bool | new_value | ) |
| inline

Definition at line 172 of file Partition.hxx.

void Partition::SetRepeat | ( | bool | new_value | ) |
| inline

Definition at line 164 of file Partition.hxx.

void Partition::SetReplayGainMode | ( | ReplayGainMode | mode | ) |
| inline

Definition at line 184 of file Partition.hxx.

void Partition::SetSingle | ( | bool | new_value | ) |
| inline

Definition at line 176 of file Partition.hxx.

void Partition::Shuffle | ( | unsigned | start,
|  | unsigned | end
| ) |  |
| inline

Definition at line 102 of file Partition.hxx.

void Partition::StaleSong | ( | const char * | uri | ) |
| inline

Definition at line 98 of file Partition.hxx.

void Partition::Stop | ( |  | ) |
| inline

Definition at line 132 of file Partition.hxx.

void Partition::SwapIds | ( | unsigned | id1,
|  | unsigned | id2
| ) |  |
| inline

Definition at line 118 of file Partition.hxx.

void Partition::SwapPositions | ( | unsigned | song1,
|  | unsigned | song2
| ) |  |
| inline

Definition at line 114 of file Partition.hxx.

void Partition::SyncWithPlayer | ( |  | ) |

Synchronize the player with the play queue.

void Partition::TagModified | ( |  | ) |

A tag in the play queue has been modified by the player thread.

Propagate the change to all subsystems.

void Partition::UpdateEffectiveReplayGainMode | ( |  | ) |

Publishes the effective ReplayGainMode to all subsystems.

ReplayGainMode::AUTO is substituted.

## Field Documentation

MaskMonitor Partition::global_events

Definition at line 48 of file Partition.hxx.

Instance& Partition::instance

Definition at line 46 of file Partition.hxx.

MultipleOutputs Partition::outputs

Definition at line 52 of file Partition.hxx.

PlayerControl Partition::pc

Definition at line 54 of file Partition.hxx.

struct playlist Partition::playlist

Definition at line 50 of file Partition.hxx.

ReplayGainMode Partition::replay_gain_mode = ReplayGainMode::OFF

Definition at line 56 of file Partition.hxx.

constexpr unsigned Partition::SYNC_WITH_PLAYER = 0x2
| static

Definition at line 44 of file Partition.hxx.

constexpr unsigned Partition::TAG_MODIFIED = 0x1
| static

Definition at line 43 of file Partition.hxx.

The documentation for this struct was generated from the following file:

- Partition.hxx