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:
parent
e75327b332
commit
d6f2a54654
3 changed files with 11 additions and 3 deletions
|
@ -127,6 +127,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
Q_NULL = 0,
|
||||||
Q_AUDIO_PLAY = 1,
|
Q_AUDIO_PLAY = 1,
|
||||||
Q_AUDIO_STOP,
|
Q_AUDIO_STOP,
|
||||||
Q_AUDIO_PAUSE,
|
Q_AUDIO_PAUSE,
|
||||||
|
@ -2623,3 +2624,11 @@ void audio_init(void)
|
||||||
thread_thaw(audio_thread_p);
|
thread_thaw(audio_thread_p);
|
||||||
|
|
||||||
} /* audio_init */
|
} /* 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);
|
||||||
|
}
|
||||||
|
|
|
@ -286,6 +286,7 @@ static void voice_thread(void)
|
||||||
struct voice_thread_data td;
|
struct voice_thread_data td;
|
||||||
|
|
||||||
voice_data_init(&td);
|
voice_data_init(&td);
|
||||||
|
audio_wait_for_init();
|
||||||
|
|
||||||
goto message_wait;
|
goto message_wait;
|
||||||
|
|
||||||
|
@ -430,9 +431,6 @@ void voice_thread_resume(void)
|
||||||
{
|
{
|
||||||
logf("Thawing voice thread");
|
logf("Thawing voice thread");
|
||||||
thread_thaw(voice_thread_p);
|
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
|
#ifdef HAVE_PRIORITY_SCHEDULING
|
||||||
|
|
|
@ -77,6 +77,7 @@ struct audio_debug
|
||||||
};
|
};
|
||||||
|
|
||||||
void audio_init(void);
|
void audio_init(void);
|
||||||
|
void audio_wait_for_init(void);
|
||||||
void audio_play(long offset);
|
void audio_play(long offset);
|
||||||
void audio_stop(void);
|
void audio_stop(void);
|
||||||
void audio_pause(void);
|
void audio_pause(void);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue