1
0
Fork 0
forked from len0rd/rockbox

Make sure initial menu item is voiced at startup. Voice thread must wait for the audio thread to finish initializing hardware. A known issue at speex commit time (perhaps only by myself ;). The behavioral refinement time begins.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15682 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-11-19 11:59:52 +00:00
parent e75327b332
commit d6f2a54654
3 changed files with 11 additions and 3 deletions

View file

@ -127,6 +127,7 @@
#endif
enum {
Q_NULL = 0,
Q_AUDIO_PLAY = 1,
Q_AUDIO_STOP,
Q_AUDIO_PAUSE,
@ -2623,3 +2624,11 @@ void audio_init(void)
thread_thaw(audio_thread_p);
} /* audio_init */
/* Wait until audio thread can respond to messages - this implies
* it has finished initialization */
void audio_wait_for_init(void)
{
LOGFQUEUE("audio >| Q_NULL");
queue_send(&audio_queue, Q_NULL, 0);
}

View file

@ -286,6 +286,7 @@ static void voice_thread(void)
struct voice_thread_data td;
voice_data_init(&td);
audio_wait_for_init();
goto message_wait;
@ -430,9 +431,6 @@ void voice_thread_resume(void)
{
logf("Thawing voice thread");
thread_thaw(voice_thread_p);
/* Wait for initialization to complete (a very short wait until the
* voice thread is available to process messages) */
queue_send(&voice_queue, Q_VOICE_NULL, 0);
}
#ifdef HAVE_PRIORITY_SCHEDULING

View file

@ -77,6 +77,7 @@ struct audio_debug
};
void audio_init(void);
void audio_wait_for_init(void);
void audio_play(long offset);
void audio_stop(void);
void audio_pause(void);