Show a nice splash screen when restarting the playback.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7225 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-07-22 16:57:08 +00:00
parent 90161c92dd
commit e0d17510d9
2 changed files with 17 additions and 1 deletions

View file

@ -3178,3 +3178,10 @@ desc: in playback settings, crossfade option
eng: "Mix"
voice: "Mix"
new:
id: LANG_RESTARTING_PLAYBACK
desc: splash screen displayed when pcm buffer size is changed
eng: "Restarting playback..."
voice: "Restarting playback..."
new:

View file

@ -1799,6 +1799,8 @@ void audio_set_crossfade(int type)
audio_stop_playback();
/* Re-initialize audio system. */
if (was_playing)
splash(0, true, str(LANG_RESTARTING_PLAYBACK));
pcmbuf_init(size);
pcmbuf_crossfade_enable(seconds > 2);
codecbuflen = audiobufend - audiobuf - pcmbuf_get_bufsize()
@ -1807,8 +1809,15 @@ void audio_set_crossfade(int type)
logf("fbuf:%dB", codecbuflen);
/* Restart playback. */
if (was_playing)
if (was_playing) {
audio_play(offset);
/* Wait for the playback to start again (and display the splash
screen during that period. */
playing = true;
while (playing && !codec_loaded)
yield();
}
}
void mpeg_id3_options(bool _v1first)