diff options
author | Hardeep Sidhu <dyp@pobox.com> | 2006-05-15 19:15:04 +0000 |
---|---|---|
committer | Hardeep Sidhu <dyp@pobox.com> | 2006-05-15 19:15:04 +0000 |
commit | bda2d5e7980d265a51b995ef428a4892d66256eb (patch) | |
tree | 2fba2c43534c9644af7501b8b49a799db7b345a5 | |
parent | 3fcd68dd067ba3b5696ac10a3eefadd4024515e8 (diff) |
Boost cpu when performing large insertions or saving playlist to disk
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9942 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playlist.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 9adc2c088c..3c9aa1958f 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -2835,11 +2835,15 @@ int playlist_insert_directory(struct playlist_info* playlist, display_playlist_count(count, count_str); + cpu_boost(true); + result = add_directory_to_playlist(playlist, dirname, &position, queue, &count, recurse); sync_control(playlist, false); + cpu_boost(false); + display_playlist_count(count, count_str); if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) @@ -2900,6 +2904,8 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, display_playlist_count(count, count_str); + cpu_boost(true); + while ((max = read_line(fd, temp_buf, sizeof(temp_buf))) > 0) { /* user abort */ @@ -2957,6 +2963,8 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename, sync_control(playlist, false); + cpu_boost(false); + display_playlist_count(count, count_str); if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started) @@ -3302,6 +3310,8 @@ int playlist_save(struct playlist_info* playlist, char *filename) display_playlist_count(count, str(LANG_PLAYLIST_SAVE_COUNT)); + cpu_boost(true); + index = playlist->first_index; for (i=0; i<playlist->amount; i++) { @@ -3393,5 +3403,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) } + cpu_boost(false); + return result; } |