21 #ifndef PLAY_MANAGER_H 22 #define PLAY_MANAGER_H 24 #include "Helper/globals.h" 25 #include "Helper/MetaData/MetaData.h" 26 #include "Helper/Settings/SayonaraClass.h" 28 template<
typename T,
int N_ITEMS>
46 void insert(
const T& item){
47 _data[_cur_idx] = item;
48 _cur_idx = (_cur_idx + 1) % N_ITEMS;
49 _n_items = std::min(N_ITEMS, _n_items + 1);
52 bool has_item(
const T& item)
const {
53 for(
int i=0; i<_n_items; i++){
112 void sig_seeked_rel(
double percent);
118 void sig_seeked_rel_ms(qint64 ms);
124 void sig_seeked_abs_ms(quint64 ms);
130 void sig_position_changed_ms(quint64 ms);
136 void sig_track_changed(
const MetaData& md);
142 void sig_track_idx_changed(
int idx);
148 void sig_playlist_changed(
int len);
154 void sig_duration_changed(quint64 ms);
159 void sig_playlist_finished();
167 void sig_record(
bool b);
173 void sig_buffer(
int b);
179 void sig_volume_changed(
int vol);
186 void sig_mute_changed(
bool b);
188 void sig_md_changed(
const MetaData& md);
191 void sig_duration_changed(qint64 ms);
237 void seek_rel(
double percent);
243 void seek_abs_ms(quint64 ms);
249 void seek_rel_ms(qint64 ms);
255 void set_position_ms(quint64 ms);
261 void change_track(
const MetaData& md,
int playlist_idx);
268 void duration_changed(quint64 duration_ms);
273 void set_track_ready();
279 void buffering(
int progress);
295 void set_volume(
int vol);
301 void set_mute(
bool b);
304 void change_metadata(
const MetaData& md);
308 void change_duration(qint64 ms);
321 quint64 get_cur_position_ms()
const;
327 quint64 get_init_position_ms()
const;
333 quint64 get_duration_ms()
const;
345 int get_volume()
const;
352 bool get_mute()
const;
357 quint64 _position_ms;
359 quint64 _initial_position_ms;
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
PlayState
Current Playing state.
Definition: PlayManager.h:79
Global handler for current playback state (Singleton)
Definition: PlayManager.h:67
Definition: PlayManager.h:29