Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
grimes2 committed Apr 30, 2023
1 parent 07a6357 commit adffd7d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions foo_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static constexpr const char* component_name = "Loop";

DECLARE_COMPONENT_VERSION(
component_name,
"1.5",
"1.6",
"grimes\n\n"
"Build: " __TIME__ ", " __DATE__
);
Expand Down Expand Up @@ -185,19 +185,22 @@ static mainmenu_commands_factory_t<mainmenu_commands_loop> g_mainmenu_commands_l
class play_callback_loop : public play_callback_static
{
public:
unsigned get_flags() { return flag_on_playback_stop | flag_on_playback_seek; }
unsigned get_flags() { return flag_on_playback_stop | flag_on_playback_pause; }

virtual void on_playback_seek(double p_time) {
if (loop_length > 0) {
loop_position_start = p_time;
}
}
virtual void on_playback_seek(double) {}
virtual void on_playback_new_track(metadb_handle_ptr) {}
virtual void on_playback_stop(play_control::t_stop_reason) {
if (menu_loop_enabled)
if (menu_loop_enabled) {
KillTimer(NULL, ptr2);
FB2K_console_formatter() << "Loop aborted";
}
}
virtual void on_playback_pause(bool paused) {
if (menu_loop_enabled && paused) {
KillTimer(NULL, ptr2);
FB2K_console_formatter() << "Loop aborted";
}
}
virtual void on_playback_pause(bool) {}
virtual void on_playback_starting(play_control::t_track_command, bool) {}
virtual void on_playback_edited(metadb_handle_ptr) {}
virtual void on_playback_dynamic_info(const file_info&) {}
Expand Down

0 comments on commit adffd7d

Please sign in to comment.