diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-22 16:57:08 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-22 16:57:08 +0000 |
| commit | e0d17510d9006f709ff4c18aeafefd68a4f548d8 (patch) | |
| tree | b9c7d849555252b8b14f522f1b2969c8b208af65 /apps | |
| parent | 90161c92ddbccbdf9e28d43c75bb7e64ddfbecd0 (diff) | |
| download | rockbox-e0d17510d9006f709ff4c18aeafefd68a4f548d8.zip rockbox-e0d17510d9006f709ff4c18aeafefd68a4f548d8.tar.gz rockbox-e0d17510d9006f709ff4c18aeafefd68a4f548d8.tar.bz2 rockbox-e0d17510d9006f709ff4c18aeafefd68a4f548d8.tar.xz | |
Show a nice splash screen when restarting the playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7225 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/lang/english.lang | 7 | ||||
| -rw-r--r-- | apps/playback.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 4c38fad..f2f38d2 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -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: + diff --git a/apps/playback.c b/apps/playback.c index f502d82..3dec7b8 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -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) |