diff options
Diffstat (limited to 'apps/plugins/splitedit.c')
-rw-r--r-- | apps/plugins/splitedit.c | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index 539fc85011..b698e2e18a 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -24,27 +24,7 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | /* variable button definitions */ | 26 | /* variable button definitions */ |
27 | #if CONFIG_KEYPAD == RECORDER_PAD | 27 | #if CONFIG_KEYPAD == IRIVER_H100_PAD |
28 | #define SPLITEDIT_QUIT BUTTON_OFF | ||
29 | #define SPLITEDIT_PLAY BUTTON_PLAY | ||
30 | #define SPLITEDIT_SAVE BUTTON_F1 | ||
31 | #define SPLITEDIT_LOOP_MODE BUTTON_F2 | ||
32 | #define SPLITEDIT_SCALE BUTTON_F3 | ||
33 | #define SPLITEDIT_SPEED50 (BUTTON_ON | BUTTON_LEFT) | ||
34 | #define SPLITEDIT_SPEED100 (BUTTON_ON | BUTTON_PLAY) | ||
35 | #define SPLITEDIT_SPEED150 (BUTTON_ON | BUTTON_RIGHT) | ||
36 | #define SPLITEDIT_MENU_RUN BUTTON_PLAY | ||
37 | |||
38 | #elif CONFIG_KEYPAD == ONDIO_PAD | ||
39 | #define SPLITEDIT_QUIT BUTTON_OFF | ||
40 | #define SPLITEDIT_PLAY_PRE BUTTON_MENU | ||
41 | #define SPLITEDIT_PLAY (BUTTON_MENU | BUTTON_REL) | ||
42 | #define SPLITEDIT_SAVE (BUTTON_MENU | BUTTON_LEFT) | ||
43 | #define SPLITEDIT_LOOP_MODE (BUTTON_MENU | BUTTON_UP) | ||
44 | #define SPLITEDIT_SCALE (BUTTON_MENU | BUTTON_RIGHT) | ||
45 | #define SPLITEDIT_MENU_RUN BUTTON_RIGHT | ||
46 | |||
47 | #elif CONFIG_KEYPAD == IRIVER_H100_PAD | ||
48 | #define SPLITEDIT_QUIT BUTTON_OFF | 28 | #define SPLITEDIT_QUIT BUTTON_OFF |
49 | #define SPLITEDIT_PLAY BUTTON_ON | 29 | #define SPLITEDIT_PLAY BUTTON_ON |
50 | #define SPLITEDIT_SAVE BUTTON_SELECT | 30 | #define SPLITEDIT_SAVE BUTTON_SELECT |
@@ -279,12 +259,6 @@ static void update_icons(void) | |||
279 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 259 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
280 | BMPWIDTH, BMPHEIGHT); | 260 | BMPWIDTH, BMPHEIGHT); |
281 | 261 | ||
282 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
283 | /* The scale icon */ | ||
284 | rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs() ? 1 : 0], | ||
285 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | ||
286 | BMPWIDTH, BMPHEIGHT); | ||
287 | #else | ||
288 | { | 262 | { |
289 | static int idx; | 263 | static int idx; |
290 | if (idx < 0 || idx > 1) idx = 0; | 264 | if (idx < 0 || idx > 1) idx = 0; |
@@ -293,7 +267,6 @@ static void update_icons(void) | |||
293 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 267 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
294 | BMPWIDTH, BMPHEIGHT); | 268 | BMPWIDTH, BMPHEIGHT); |
295 | } | 269 | } |
296 | #endif | ||
297 | 270 | ||
298 | rb->lcd_update_rect(0, LCD_HEIGHT - BMPHEIGHT, LCD_WIDTH, BMPHEIGHT); | 271 | rb->lcd_update_rect(0, LCD_HEIGHT - BMPHEIGHT, LCD_WIDTH, BMPHEIGHT); |
299 | } | 272 | } |
@@ -961,14 +934,7 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
961 | { | 934 | { |
962 | /* read volume info */ | 935 | /* read volume info */ |
963 | unsigned short volume; | 936 | unsigned short volume; |
964 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
965 | volume = rb->mas_codec_readreg(0x0c); | ||
966 | volume += rb->mas_codec_readreg(0x0d); | ||
967 | volume = volume / 2; | ||
968 | volume = rb->peak_meter_scale_value(volume, OSCI_HEIGHT); | ||
969 | #else | ||
970 | volume = OSCI_HEIGHT / 2; | 937 | volume = OSCI_HEIGHT / 2; |
971 | #endif | ||
972 | 938 | ||
973 | /* update osci_buffer */ | 939 | /* update osci_buffer */ |
974 | if (osci_valid || lastx == x) | 940 | if (osci_valid || lastx == x) |
@@ -1126,25 +1092,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1126 | lastx = time_to_xpos(mp3->elapsed); | 1092 | lastx = time_to_xpos(mp3->elapsed); |
1127 | break; | 1093 | break; |
1128 | 1094 | ||
1129 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
1130 | #ifdef SPLITEDIT_SPEED100 | ||
1131 | case SPLITEDIT_SPEED150: | ||
1132 | rb->sound_set_pitch(150L*PITCH_SPEED_PRECISION); | ||
1133 | splitedit_invalidate_osci(); | ||
1134 | break; | ||
1135 | |||
1136 | case SPLITEDIT_SPEED100: | ||
1137 | rb->sound_set_pitch(PITCH_SPEED_100); | ||
1138 | splitedit_invalidate_osci(); | ||
1139 | break; | ||
1140 | |||
1141 | case SPLITEDIT_SPEED50: | ||
1142 | rb->sound_set_pitch(50L*PITCH_SPEED_PRECISION); | ||
1143 | splitedit_invalidate_osci(); | ||
1144 | break; | ||
1145 | #endif | ||
1146 | #endif | ||
1147 | |||
1148 | case BUTTON_LEFT: | 1095 | case BUTTON_LEFT: |
1149 | case BUTTON_LEFT | BUTTON_REPEAT: | 1096 | case BUTTON_LEFT | BUTTON_REPEAT: |
1150 | if (splitedit_get_split_x() > OSCI_X + 2) | 1097 | if (splitedit_get_split_x() > OSCI_X + 2) |
@@ -1185,9 +1132,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1185 | break; | 1132 | break; |
1186 | 1133 | ||
1187 | case SPLITEDIT_SCALE: | 1134 | case SPLITEDIT_SCALE: |
1188 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
1189 | rb->peak_meter_set_use_dbfs(!rb->peak_meter_get_use_dbfs()); | ||
1190 | #endif | ||
1191 | splitedit_invalidate_osci(); | 1135 | splitedit_invalidate_osci(); |
1192 | update_icons(); | 1136 | update_icons(); |
1193 | break; | 1137 | break; |
@@ -1257,12 +1201,6 @@ static unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1257 | } | 1201 | } |
1258 | } | 1202 | } |
1259 | } | 1203 | } |
1260 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
1261 | #ifdef SPLITEDIT_SPEED100 | ||
1262 | rb->sound_set_pitch(1000); /* make sure to reset pitch */ | ||
1263 | #endif | ||
1264 | #endif | ||
1265 | |||
1266 | } | 1204 | } |
1267 | return retval; | 1205 | return retval; |
1268 | } | 1206 | } |