foobar2000 SDK
2015-08-03
|
#include <play_callback.h>
Public Types | |
enum | { flag_on_playback_starting = 1 << 0, flag_on_playback_new_track = 1 << 1, flag_on_playback_stop = 1 << 2, flag_on_playback_seek = 1 << 3, flag_on_playback_pause = 1 << 4, flag_on_playback_edited = 1 << 5, flag_on_playback_dynamic_info = 1 << 6, flag_on_playback_dynamic_info_track = 1 << 7, flag_on_playback_time = 1 << 8, flag_on_volume_change = 1 << 9, flag_on_playback_all } |
Public Member Functions | |
virtual void FB2KAPI | on_playback_dynamic_info (const file_info &p_info)=0 |
virtual void FB2KAPI | on_playback_dynamic_info_track (const file_info &p_info)=0 |
virtual void FB2KAPI | on_playback_edited (metadb_handle_ptr p_track)=0 |
virtual void FB2KAPI | on_playback_new_track (metadb_handle_ptr p_track)=0 |
virtual void FB2KAPI | on_playback_pause (bool p_state)=0 |
virtual void FB2KAPI | on_playback_seek (double p_time)=0 |
virtual void FB2KAPI | on_playback_starting (play_control::t_track_command p_command, bool p_paused)=0 |
virtual void FB2KAPI | on_playback_stop (play_control::t_stop_reason p_reason)=0 |
virtual void FB2KAPI | on_playback_time (double p_time)=0 |
virtual void FB2KAPI | on_volume_change (float p_new_val)=0 |
Protected Member Functions | |
play_callback () | |
~play_callback () | |
Class receiving notifications about playback events. Note that all methods are called only from app's main thread. Use play_callback_manager to register your dynamically created instances. Statically registered version is available too - see play_callback_static.
Definition at line 5 of file play_callback.h.
anonymous enum |
Definition at line 29 of file play_callback.h.
|
inlineprotected |
Definition at line 47 of file play_callback.h.
|
inlineprotected |
Definition at line 48 of file play_callback.h.
|
pure virtual |
Dynamic info (VBR bitrate etc) change.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Per-track dynamic info (stream track titles etc) change. Happens less often than on_playback_dynamic_info().
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Called when currently played file gets edited.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Playback advanced to new track.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Called on pause/unpause.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
User has seeked to specific time.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Playback process is being initialized. on_playback_new_track() should be called soon after this when first file is successfully opened for decoding.
Implemented in playback_event_notify, and play_callback_impl_base.
|
pure virtual |
Playback stopped.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
Called every second, for time display.
Implemented in playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.
|
pure virtual |
User changed volume settings. Possibly called when not playing.
p_new_val | new volume level in dB; 0 for full volume. |
Implemented in playback_volume_notify, playback_event_notify, play_callback_impl_base, and CPlaybackStateDemo.