![]() |
Sayonara Player
|
#include <PlayManager.h>
Global handler for current playback state (Singleton)
Signals | |
void | sig_www_track_finished (const MetaData &old_md) |
emitted when a streamed track has finished More... | |
void | sig_playstate_changed (PlayState) |
emitted, when PlayState was changed | |
void | sig_next () |
next track was triggered | |
void | sig_wake_up () |
This signal is sent when the playstate changed from stopped to play. | |
void | sig_previous () |
previous track was triggered | |
void | sig_stopped () |
stop was triggered | |
void | sig_seeked_rel (double percent) |
relative seeking was triggered More... | |
void | sig_seeked_rel_ms (MilliSeconds ms) |
relative seeking was triggered More... | |
void | sig_seeked_abs_ms (MilliSeconds ms) |
absolute seeking was triggered More... | |
void | sig_position_changed_ms (MilliSeconds ms) |
position in track has changed More... | |
void | sig_track_changed (const MetaData &md) |
track has changed More... | |
void | sig_track_idx_changed (int idx) |
track has changed More... | |
void | sig_duration_changed (MilliSeconds ms) |
duration of track has changed More... | |
void | sig_playlist_finished () |
playlist has finished | |
void | sig_record (bool b) |
recording is requested More... | |
void | sig_buffer (int b) |
emitted when currently in buffering state More... | |
void | sig_volume_changed (int vol) |
emitted when volume has changed More... | |
void | sig_mute_changed (bool b) |
emitted when mute state has changed More... | |
void | sig_md_changed (const MetaData &md) |
void | sig_error (const QString &message) |
Public Member Functions | |
PlayState | playstate () const |
get current play state More... | |
MilliSeconds | current_position_ms () const |
get current position in milliseconds More... | |
MilliSeconds | initial_position_ms () const |
get position in milliseconds where track will start More... | |
MilliSeconds | duration_ms () const |
get duration of track More... | |
const MetaData & | current_track () const |
get current track More... | |
int | volume () const |
get current volume More... | |
bool | is_muted () const |
query mute status More... | |
void | shutdown () |
Shutdown the computer. | |
Public Slots | |
void | play () |
Start playing if there's a track. | |
void | wake_up () |
Emit wake up signal after stopping state. | |
void | play_pause () |
toggle play/pause | |
void | pause () |
pause track, if currently playing | |
void | previous () |
change to previous track | |
void | next () |
change to next track | |
void | stop () |
stop playback | |
void | record (bool b) |
request recording (see also sig_record(bool b)) More... | |
void | seek_rel (double percent) |
seek relative More... | |
void | seek_abs_ms (MilliSeconds ms) |
seek absolute More... | |
void | seek_rel_ms (MilliSeconds ms) |
seek_rel_ms More... | |
void | set_position_ms (MilliSeconds ms) |
set current position of track This method does not seek. Just tells the playmanager where the current position is More... | |
void | change_track (const MetaData &md, int track_idx) |
change current track More... | |
void | set_track_ready () |
notify, that track is ready for playback | |
void | buffering (int progress) |
notifiy, that track is in buffering state currently More... | |
void | volume_up () |
increase volume by 5 | |
void | volume_down () |
decrease volume by 5 | |
void | set_volume (int vol) |
set volume More... | |
void | set_muted (bool b) |
mute/unmute More... | |
void | toggle_mute () |
If already muted, then unmute. If unmuted, then mute it. | |
void | change_metadata (const MetaData &md) |
Change the current MetaData object. This may happen if the current track is edited while playing. More... | |
void | change_duration (MilliSeconds ms) |
Change the duration. This is usually called when the Engine sends a duration changed signal. You should not use this. More... | |
void | error (const QString &message) |
Some playback error occured. More... | |
|
slot |
notifiy, that track is in buffering state currently
progress |
|
slot |
Change the duration. This is usually called when the Engine sends a duration changed signal. You should not use this.
ms |
|
slot |
Change the current MetaData object. This may happen if the current track is edited while playing.
md |
|
slot |
change current track
md | new MetaData object |
MilliSeconds PlayManager::current_position_ms | ( | ) | const |
get current position in milliseconds
const MetaData& PlayManager::current_track | ( | ) | const |
get current track
MilliSeconds PlayManager::duration_ms | ( | ) | const |
get duration of track
|
slot |
Some playback error occured.
message |
MilliSeconds PlayManager::initial_position_ms | ( | ) | const |
get position in milliseconds where track will start
bool PlayManager::is_muted | ( | ) | const |
query mute status
PlayState PlayManager::playstate | ( | ) | const |
get current play state
|
slot |
request recording (see also sig_record(bool b))
b | true, when a new recording session should begin, false if a recording session should stop |
|
slot |
seek absolute
ms | absolute position in milliseconds |
|
slot |
seek relative
percent | relative position within track |
|
slot |
seek_rel_ms
ms | relative position to current position in milliseconds |
|
slot |
mute/unmute
b |
|
slot |
set current position of track This method does not seek. Just tells the playmanager where the current position is
ms | position in milliseconds. |
|
slot |
set volume
vol | value between [0,100], will be cropped if not within boundaries |
|
signal |
emitted when currently in buffering state
b | true if buffering, false else |
|
signal |
duration of track has changed
ms | duration of track in milliseconds |
|
signal |
emitted when mute state has changed
b | true if muted, false else |
|
signal |
position in track has changed
ms | absolute position in milliseconds |
|
signal |
recording is requested
b | true, when a new recording session should begin, false if a recording session should stop |
|
signal |
absolute seeking was triggered
ms | absolute position in milliseconds |
|
signal |
relative seeking was triggered
percent | relative position in track |
|
signal |
relative seeking was triggered
ms | relative position to current position in milliseconds |
|
signal |
track has changed
md | new MetaData |
|
signal |
track has changed
idx | index in playlist |
|
signal |
emitted when volume has changed
vol | value between 0 and 100 |
|
signal |
emitted when a streamed track has finished
old_md | the last played track |
int PlayManager::volume | ( | ) | const |
get current volume