foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
playback_event_notify

#include <play_callback.h>

+ Inheritance diagram for playback_event_notify:

Public Member Functions

 playback_event_notify (playback_control::t_display_level level=playback_control::display_level_all)
 

Static Public Member Functions

static t_uint32 GrabCBFlags (playback_control::t_display_level level)
 

Protected Member Functions

virtual void on_playback_event ()
 

Private Member Functions

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)
 
- Private Member Functions inherited from play_callback_impl_base
 play_callback_impl_base (unsigned p_flags=~0)
 
 ~play_callback_impl_base ()
 
void play_callback_reregister (unsigned flags, bool refresh=false)
 
 play_callback ()
 
 ~play_callback ()
 

Additional Inherited Members

- Private 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
}
 

Detailed Description

Helper providing a simplified interface for receiving playback events, in case your code does not care about the kind of playback event that has occurred; useful typically for GUI/rendering code that just refreshes some control whenever a playback state change occurs.

Definition at line 126 of file play_callback.h.

Constructor & Destructor Documentation

playback_event_notify::playback_event_notify ( playback_control::t_display_level  level = playback_control::display_level_all)
inline

Definition at line 128 of file play_callback.h.

static t_uint32 GrabCBFlags(playback_control::t_display_level level)
play_callback_impl_base(unsigned p_flags=~0)
Definition: play_callback.h:72

Member Function Documentation

static t_uint32 playback_event_notify::GrabCBFlags ( playback_control::t_display_level  level)
inlinestatic

Definition at line 130 of file play_callback.h.

void playback_event_notify::on_playback_dynamic_info ( const file_info p_info)
inlineprivatevirtual

Dynamic info (VBR bitrate etc) change.

Reimplemented from play_callback_impl_base.

Definition at line 145 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_dynamic_info_track ( const file_info p_info)
inlineprivatevirtual

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

Reimplemented from play_callback_impl_base.

Definition at line 146 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_edited ( metadb_handle_ptr  p_track)
inlineprivatevirtual

Called when currently played file gets edited.

Reimplemented from play_callback_impl_base.

Definition at line 144 of file play_callback.h.

virtual void on_playback_event()
virtual void playback_event_notify::on_playback_event ( )
inlineprotectedvirtual

Definition at line 137 of file play_callback.h.

137 {}
void playback_event_notify::on_playback_new_track ( metadb_handle_ptr  p_track)
inlineprivatevirtual

Playback advanced to new track.

Reimplemented from play_callback_impl_base.

Definition at line 140 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_pause ( bool  p_state)
inlineprivatevirtual

Called on pause/unpause.

Reimplemented from play_callback_impl_base.

Definition at line 143 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_seek ( double  p_time)
inlineprivatevirtual

User has seeked to specific time.

Reimplemented from play_callback_impl_base.

Definition at line 142 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_starting ( play_control::t_track_command  p_command,
bool  p_paused 
)
inlineprivatevirtual

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

Reimplemented from play_callback_impl_base.

Definition at line 139 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_stop ( play_control::t_stop_reason  p_reason)
inlineprivatevirtual

Playback stopped.

Reimplemented from play_callback_impl_base.

Definition at line 141 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_playback_time ( double  p_time)
inlineprivatevirtual

Called every second, for time display.

Reimplemented from play_callback_impl_base.

Definition at line 147 of file play_callback.h.

virtual void on_playback_event()
void playback_event_notify::on_volume_change ( float  p_new_val)
inlineprivatevirtual

User changed volume settings. Possibly called when not playing.

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

Reimplemented from play_callback_impl_base.

Definition at line 148 of file play_callback.h.

virtual void on_playback_event()

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