foobar2000 SDK  2015-08-03
Public Member Functions
play_callback_impl_base

#include <play_callback.h>

+ Inheritance diagram for play_callback_impl_base:

Public Member Functions

 play_callback_impl_base (unsigned p_flags=~0)
 
 ~play_callback_impl_base ()
 
void on_playback_dynamic_info (const file_info &p_info)
 
void on_playback_dynamic_info_track (const file_info &p_info)
 
void on_playback_edited (metadb_handle_ptr p_track)
 
void on_playback_new_track (metadb_handle_ptr p_track)
 
void on_playback_pause (bool p_state)
 
void on_playback_seek (double p_time)
 
void on_playback_starting (play_control::t_track_command p_command, bool p_paused)
 
void on_playback_stop (play_control::t_stop_reason p_reason)
 
void on_playback_time (double p_time)
 
void on_volume_change (float p_new_val)
 
void play_callback_reregister (unsigned flags, bool refresh=false)
 

Additional Inherited Members

- Public Types inherited from play_callback
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
}
 
- Protected Member Functions inherited from play_callback
 play_callback ()
 
 ~play_callback ()
 

Detailed Description

Implementation helper.

Definition at line 70 of file play_callback.h.

Constructor & Destructor Documentation

play_callback_impl_base::play_callback_impl_base ( unsigned  p_flags = ~0)
inline

Definition at line 72 of file play_callback.h.

72  {
73  static_api_ptr_t<play_callback_manager>()->register_callback(this,p_flags,false);
74  }
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533
play_callback_impl_base::~play_callback_impl_base ( )
inline

Definition at line 75 of file play_callback.h.

75  {
76  static_api_ptr_t<play_callback_manager>()->unregister_callback(this);
77  }
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533

Member Function Documentation

void play_callback_impl_base::on_playback_dynamic_info ( const file_info p_info)
inlinevirtual

Dynamic info (VBR bitrate etc) change.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 89 of file play_callback.h.

89 {}
void play_callback_impl_base::on_playback_dynamic_info_track ( const file_info p_info)
inlinevirtual

Per-track dynamic info (stream track titles etc) change. Happens less often than on_playback_dynamic_info().

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 90 of file play_callback.h.

90 {}
void play_callback_impl_base::on_playback_edited ( metadb_handle_ptr  p_track)
inlinevirtual

Called when currently played file gets edited.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 88 of file play_callback.h.

88 {}
void play_callback_impl_base::on_playback_new_track ( metadb_handle_ptr  p_track)
inlinevirtual

Playback advanced to new track.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 84 of file play_callback.h.

84 {}
void play_callback_impl_base::on_playback_pause ( bool  p_state)
inlinevirtual

Called on pause/unpause.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 87 of file play_callback.h.

87 {}
void play_callback_impl_base::on_playback_seek ( double  p_time)
inlinevirtual

User has seeked to specific time.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 86 of file play_callback.h.

86 {}
void play_callback_impl_base::on_playback_starting ( play_control::t_track_command  p_command,
bool  p_paused 
)
inlinevirtual

Playback process is being initialized. on_playback_new_track() should be called soon after this when first file is successfully opened for decoding.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 83 of file play_callback.h.

83 {}
void play_callback_impl_base::on_playback_stop ( play_control::t_stop_reason  p_reason)
inlinevirtual

Playback stopped.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 85 of file play_callback.h.

85 {}
void play_callback_impl_base::on_playback_time ( double  p_time)
inlinevirtual

Called every second, for time display.

Implements play_callback.

Reimplemented in playback_event_notify.

Definition at line 91 of file play_callback.h.

91 {}
void play_callback_impl_base::on_volume_change ( float  p_new_val)
inlinevirtual

User changed volume settings. Possibly called when not playing.

Parameters
p_new_valnew volume level in dB; 0 for full volume.

Implements play_callback.

Reimplemented in playback_volume_notify, and playback_event_notify.

Definition at line 92 of file play_callback.h.

92 {}
void play_callback_impl_base::play_callback_reregister ( unsigned  flags,
bool  refresh = false 
)
inline

Definition at line 78 of file play_callback.h.

78  {
80  api->unregister_callback(this);
81  api->register_callback(this,flags,refresh);
82  }
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533

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