···613613 if (bookmark)
614614 bookmark_autobookmark(true);
615615 audio_stop();
616616-#ifdef AB_REPEAT_ENABLE
616616+617617 ab_reset_markers();
618618-#endif
618618+619619 gwps_leave_wps(true);
620620#ifdef HAVE_RECORDING
621621 if (action == ACTION_WPS_REC)
···678678 long last_left = 0, last_right = 0;
679679 struct wps_state *state = get_wps_state();
680680681681-#ifdef AB_REPEAT_ENABLE
682681 ab_repeat_init();
683682 ab_reset_markers();
684684-#endif
683683+685684 wps_state_init();
686685 while ( 1 )
687686 {
···904903 /* prev / restart */
905904 case ACTION_WPS_SKIPPREV:
906905 last_left = current_tick;
907907-#ifdef AB_REPEAT_ENABLE
906906+908907 /* if we're in A/B repeat mode and the current position
909908 is past the A marker, jump back to the A marker... */
910909 if ( ab_repeat_mode_enabled() && ab_after_A_marker(state->id3->elapsed) )
···912911 ab_jump_to_A_marker();
913912 break;
914913 }
915915- else
916916- /* ...otherwise, do it normally */
917917-#endif
914914+ else /* ...otherwise, do it normally */
918915 play_hop(-1);
919916 break;
920917···922919 OR if skip length set, hop by predetermined amount. */
923920 case ACTION_WPS_SKIPNEXT:
924921 last_right = current_tick;
925925-#ifdef AB_REPEAT_ENABLE
922922+926923 /* if we're in A/B repeat mode and the current position is
927924 before the A marker, jump to the A marker... */
928925 if ( ab_repeat_mode_enabled() )
···933930 break;
934931 }
935932 }
936936- else
937937- /* ...otherwise, do it normally */
938938-#endif
933933+ else /* ...otherwise, do it normally */
939934 play_hop(1);
940935 break;
941936 /* next / prev directories */
942937 /* and set A-B markers if in a-b mode */
943938 case ACTION_WPS_ABSETB_NEXTDIR:
944944-#if defined(AB_REPEAT_ENABLE)
945939 if (ab_repeat_mode_enabled())
946940 {
947941 ab_set_B_marker(state->id3->elapsed);
948942 ab_jump_to_A_marker();
949943 }
950944 else
951951-#endif
952945 {
953946 change_dir(1);
954947 }
955948 break;
956949 case ACTION_WPS_ABSETA_PREVDIR:
957957-#if defined(AB_REPEAT_ENABLE)
958950 if (ab_repeat_mode_enabled())
959951 ab_set_A_marker(state->id3->elapsed);
960952 else
961961-#endif
962953 {
963954 change_dir(-1);
964955 }
···10101001 break;
10111002#endif /* HAVE_PITCHCONTROL */
1012100310131013-#ifdef AB_REPEAT_ENABLE
10141004 /* reset A&B markers */
10151005 case ACTION_WPS_ABRESET:
10161006 if (ab_repeat_mode_enabled())
···10191009 update = true;
10201010 }
10211011 break;
10221022-#endif /* AB_REPEAT_ENABLE */
1023101210241013 /* stop and exit wps */
10251014 case ACTION_WPS_STOP:
+1-2
apps/playback.c
···34793479/* Update elapsed time for next PCM insert */
34803480void audio_codec_update_elapsed(unsigned long elapsed)
34813481{
34823482-#ifdef AB_REPEAT_ENABLE
34833482 ab_position_report(elapsed);
34843484-#endif
34833483+34853484 /* Save in codec's id3 where it is used at next pcm insert */
34863485 id3_get(CODEC_ID3)->elapsed = elapsed;
34873486}