diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 00:01:32 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 8cb555460ff79e636a7907fb2589e16db98c8600 (patch) | |
tree | 930a3878c7641c9ce045b24f0ade1309e36d5806 /apps/abrepeat.c | |
parent | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (diff) | |
download | rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.tar.gz rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.zip |
[3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
Diffstat (limited to 'apps/abrepeat.c')
-rw-r--r-- | apps/abrepeat.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/apps/abrepeat.c b/apps/abrepeat.c index 999d9dcf38..19e9450c99 100644 --- a/apps/abrepeat.c +++ b/apps/abrepeat.c | |||
@@ -39,7 +39,6 @@ static inline bool ab_B_marker_set(void) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | 41 | ||
42 | #if (CONFIG_CODEC == SWCODEC) | ||
43 | void ab_end_of_track_report(void) | 42 | void ab_end_of_track_report(void) |
44 | { | 43 | { |
45 | if ( ab_A_marker_set() && ! ab_B_marker_set() ) | 44 | if ( ab_A_marker_set() && ! ab_B_marker_set() ) |
@@ -47,38 +46,6 @@ void ab_end_of_track_report(void) | |||
47 | ab_jump_to_A_marker(); | 46 | ab_jump_to_A_marker(); |
48 | } | 47 | } |
49 | } | 48 | } |
50 | #else | ||
51 | static int ab_audio_event_handler(unsigned short event, unsigned long data) | ||
52 | { | ||
53 | int rc = AUDIO_EVENT_RC_IGNORED; | ||
54 | if ( ab_repeat_mode_enabled() ) | ||
55 | { | ||
56 | switch(event) | ||
57 | { | ||
58 | case AUDIO_EVENT_POS_REPORT: | ||
59 | { | ||
60 | if ( ! (audio_status() & AUDIO_STATUS_PAUSE) && | ||
61 | ab_reached_B_marker(data) ) | ||
62 | { | ||
63 | ab_jump_to_A_marker(); | ||
64 | rc = AUDIO_EVENT_RC_HANDLED; | ||
65 | } | ||
66 | break; | ||
67 | } | ||
68 | case AUDIO_EVENT_END_OF_TRACK: | ||
69 | { | ||
70 | if ( ab_A_marker_set() && ! ab_B_marker_set() ) | ||
71 | { | ||
72 | ab_jump_to_A_marker(); | ||
73 | rc = AUDIO_EVENT_RC_HANDLED; | ||
74 | } | ||
75 | break; | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | return rc; | ||
80 | } | ||
81 | #endif | ||
82 | 49 | ||
83 | void ab_repeat_init(void) | 50 | void ab_repeat_init(void) |
84 | { | 51 | { |
@@ -86,10 +53,6 @@ void ab_repeat_init(void) | |||
86 | if ( ! ab_initialized ) | 53 | if ( ! ab_initialized ) |
87 | { | 54 | { |
88 | ab_initialized = true; | 55 | ab_initialized = true; |
89 | #if (CONFIG_CODEC != SWCODEC) | ||
90 | audio_register_event_handler(ab_audio_event_handler, | ||
91 | AUDIO_EVENT_POS_REPORT | AUDIO_EVENT_END_OF_TRACK ); | ||
92 | #endif | ||
93 | } | 56 | } |
94 | } | 57 | } |
95 | 58 | ||
@@ -116,16 +79,7 @@ reasonable amount of time for the typical user to react */ | |||
116 | 79 | ||
117 | void ab_jump_to_A_marker(void) | 80 | void ab_jump_to_A_marker(void) |
118 | { | 81 | { |
119 | #if (CONFIG_CODEC != SWCODEC) | ||
120 | bool paused = (audio_status() & AUDIO_STATUS_PAUSE) != 0; | ||
121 | if ( ! paused ) | ||
122 | audio_pause(); | ||
123 | #endif | ||
124 | audio_ff_rewind(ab_A_marker); | 82 | audio_ff_rewind(ab_A_marker); |
125 | #if (CONFIG_CODEC != SWCODEC) | ||
126 | if ( ! paused ) | ||
127 | audio_resume(); | ||
128 | #endif | ||
129 | } | 83 | } |
130 | 84 | ||
131 | void ab_reset_markers(void) | 85 | void ab_reset_markers(void) |