summaryrefslogtreecommitdiff
path: root/apps/plugins/splitedit.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:06:29 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-04 12:06:29 +0000
commit8a237a829e0f63b61536f315209a6d0ea1477e31 (patch)
tree1fe54329fe776aa7bc982a37203cb61c13244a48 /apps/plugins/splitedit.c
parentec4e9b8d600c53add3c8bf6eb7fe1975dba141a7 (diff)
downloadrockbox-8a237a829e0f63b61536f315209a6d0ea1477e31.tar.gz
rockbox-8a237a829e0f63b61536f315209a6d0ea1477e31.zip
More audio code restructuring, mostly renaming functions so far
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6246 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/splitedit.c')
-rw-r--r--apps/plugins/splitedit.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index c2cdc8de6e..d38223827b 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -614,11 +614,11 @@ static int save(
614 } 614 }
615 615
616 /* find the file position of the split point */ 616 /* find the file position of the split point */
617 rb->mpeg_pause(); 617 rb->audio_pause();
618 rb->mpeg_ff_rewind(splittime); 618 rb->audio_ff_rewind(splittime);
619 rb->yield(); 619 rb->yield();
620 rb->yield(); 620 rb->yield();
621 end = rb->mpeg_get_file_pos(); 621 end = rb->audio_get_file_pos();
622 622
623 /* open the source file */ 623 /* open the source file */
624 src_file = rb->open(mp3->path, O_RDONLY); 624 src_file = rb->open(mp3->path, O_RDONLY);
@@ -720,7 +720,7 @@ static int save(
720 retval = -3; 720 retval = -3;
721 } 721 }
722 722
723 rb->mpeg_resume(); 723 rb->audio_resume();
724 724
725 return retval; 725 return retval;
726} 726}
@@ -985,27 +985,27 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
985 985
986 case LOOP_MODE_ALL: 986 case LOOP_MODE_ALL:
987 case LOOP_MODE_TO: 987 case LOOP_MODE_TO:
988 rb->mpeg_pause(); 988 rb->audio_pause();
989 rb->mpeg_ff_rewind(range_start); 989 rb->audio_ff_rewind(range_start);
990#ifdef HAVE_MMC 990#ifdef HAVE_MMC
991/* MMC is slow - wait some time to allow track reload to finish */ 991/* MMC is slow - wait some time to allow track reload to finish */
992 rb->sleep(HZ/20); 992 rb->sleep(HZ/20);
993 if (mp3->elapsed > play_end) /* reload in progress */ 993 if (mp3->elapsed > play_end) /* reload in progress */
994 rb->splash(10*HZ, true, "Wait - reloading"); 994 rb->splash(10*HZ, true, "Wait - reloading");
995#endif 995#endif
996 rb->mpeg_resume(); 996 rb->audio_resume();
997 break; 997 break;
998 998
999 case LOOP_MODE_FROM: 999 case LOOP_MODE_FROM:
1000 rb->mpeg_pause(); 1000 rb->audio_pause();
1001 rb->mpeg_ff_rewind(xpos_to_time(split_x)); 1001 rb->audio_ff_rewind(xpos_to_time(split_x));
1002#ifdef HAVE_MMC 1002#ifdef HAVE_MMC
1003/* MMC is slow - wait some time to allow track reload to finish */ 1003/* MMC is slow - wait some time to allow track reload to finish */
1004 rb->sleep(HZ/20); 1004 rb->sleep(HZ/20);
1005 if (mp3->elapsed > play_end) /* reload in progress */ 1005 if (mp3->elapsed > play_end) /* reload in progress */
1006 rb->splash(10*HZ, true, "Wait - reloading"); 1006 rb->splash(10*HZ, true, "Wait - reloading");
1007#endif 1007#endif
1008 rb->mpeg_resume(); 1008 rb->audio_resume();
1009 break; 1009 break;
1010 1010
1011 case LOOP_MODE_FREE: 1011 case LOOP_MODE_FREE:
@@ -1037,9 +1037,9 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
1037 if (lastbutton != SPLITEDIT_PLAY_PRE) 1037 if (lastbutton != SPLITEDIT_PLAY_PRE)
1038 break; 1038 break;
1039#endif 1039#endif
1040 rb->mpeg_pause(); 1040 rb->audio_pause();
1041 rb->mpeg_ff_rewind(xpos_to_time(split_x)); 1041 rb->audio_ff_rewind(xpos_to_time(split_x));
1042 rb->mpeg_resume(); 1042 rb->audio_resume();
1043 break; 1043 break;
1044 1044
1045 case BUTTON_UP: 1045 case BUTTON_UP:
@@ -1159,9 +1159,9 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
1159 } 1159 }
1160 update_data(); 1160 update_data();
1161 1161
1162 if (mp3 != rb->mpeg_current_track()) 1162 if (mp3 != rb->audio_current_track())
1163 { 1163 {
1164 struct mp3entry *new_mp3 = rb->mpeg_current_track(); 1164 struct mp3entry *new_mp3 = rb->audio_current_track();
1165 if (rb->strncasecmp(path_mp3, new_mp3->path, 1165 if (rb->strncasecmp(path_mp3, new_mp3->path,
1166 sizeof (path_mp3))) 1166 sizeof (path_mp3)))
1167 { 1167 {
@@ -1173,10 +1173,10 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
1173 else 1173 else
1174 { 1174 {
1175 mp3 = new_mp3; 1175 mp3 = new_mp3;
1176 rb->mpeg_pause(); 1176 rb->audio_pause();
1177 rb->mpeg_flush_and_reload_tracks(); 1177 rb->audio_flush_and_reload_tracks();
1178 rb->mpeg_ff_rewind(range_start); 1178 rb->audio_ff_rewind(range_start);
1179 rb->mpeg_resume(); 1179 rb->audio_resume();
1180 } 1180 }
1181 } 1181 }
1182 } 1182 }
@@ -1192,12 +1192,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1192 rb = api; 1192 rb = api;
1193 rb->lcd_clear_display(); 1193 rb->lcd_clear_display();
1194 rb->lcd_update(); 1194 rb->lcd_update();
1195 mp3 = rb->mpeg_current_track(); 1195 mp3 = rb->audio_current_track();
1196 if (mp3 != NULL) 1196 if (mp3 != NULL)
1197 { 1197 {
1198 if (rb->mpeg_status() & MPEG_STATUS_PAUSE) 1198 if (rb->audio_status() & AUDIO_STATUS_PAUSE)
1199 { 1199 {
1200 rb->mpeg_resume(); 1200 rb->audio_resume();
1201 } 1201 }
1202 splitedit_editor(mp3, mp3->elapsed, MIN_RANGE_SIZE * 8); 1202 splitedit_editor(mp3, mp3->elapsed, MIN_RANGE_SIZE * 8);
1203 } 1203 }