forked from len0rd/rockbox
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
This commit is contained in:
parent
3fcd68dd06
commit
bda2d5e798
1 changed files with 12 additions and 0 deletions
|
|
@ -2835,11 +2835,15 @@ int playlist_insert_directory(struct playlist_info* playlist,
|
||||||
|
|
||||||
display_playlist_count(count, count_str);
|
display_playlist_count(count, count_str);
|
||||||
|
|
||||||
|
cpu_boost(true);
|
||||||
|
|
||||||
result = add_directory_to_playlist(playlist, dirname, &position, queue,
|
result = add_directory_to_playlist(playlist, dirname, &position, queue,
|
||||||
&count, recurse);
|
&count, recurse);
|
||||||
|
|
||||||
sync_control(playlist, false);
|
sync_control(playlist, false);
|
||||||
|
|
||||||
|
cpu_boost(false);
|
||||||
|
|
||||||
display_playlist_count(count, count_str);
|
display_playlist_count(count, count_str);
|
||||||
|
|
||||||
if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started)
|
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);
|
display_playlist_count(count, count_str);
|
||||||
|
|
||||||
|
cpu_boost(true);
|
||||||
|
|
||||||
while ((max = read_line(fd, temp_buf, sizeof(temp_buf))) > 0)
|
while ((max = read_line(fd, temp_buf, sizeof(temp_buf))) > 0)
|
||||||
{
|
{
|
||||||
/* user abort */
|
/* user abort */
|
||||||
|
|
@ -2957,6 +2963,8 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename,
|
||||||
|
|
||||||
sync_control(playlist, false);
|
sync_control(playlist, false);
|
||||||
|
|
||||||
|
cpu_boost(false);
|
||||||
|
|
||||||
display_playlist_count(count, count_str);
|
display_playlist_count(count, count_str);
|
||||||
|
|
||||||
if ((audio_status() & AUDIO_STATUS_PLAY) && playlist->started)
|
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));
|
display_playlist_count(count, str(LANG_PLAYLIST_SAVE_COUNT));
|
||||||
|
|
||||||
|
cpu_boost(true);
|
||||||
|
|
||||||
index = playlist->first_index;
|
index = playlist->first_index;
|
||||||
for (i=0; i<playlist->amount; i++)
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue