diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-07-14 21:46:07 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-07-14 21:46:07 +0000 |
commit | febb52fc037959ba8ce55091efa5bdc90475da6b (patch) | |
tree | 561e2862623fbd531d25fa5a0aa7958b6dfbffdb /uisimulator/x11/thread.c | |
parent | 771ed79f73734cca78a1af22d2b426c19cb5c15a (diff) | |
download | rockbox-febb52fc037959ba8ce55091efa5bdc90475da6b.tar.gz rockbox-febb52fc037959ba8ce55091efa5bdc90475da6b.zip |
First take at PCM playback in the X11 sim on Linux.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11/thread.c')
-rw-r--r-- | uisimulator/x11/thread.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/uisimulator/x11/thread.c b/uisimulator/x11/thread.c index 41f1fad8a7..f3fe868fbc 100644 --- a/uisimulator/x11/thread.c +++ b/uisimulator/x11/thread.c @@ -17,12 +17,18 @@ * ****************************************************************************/ +#include "autoconf.h" + #include <stdio.h> #include <pthread.h> #include "kernel.h" #include <sys/time.h> +#ifdef ROCKBOX_HAS_SIMSOUND +#include "sound.h" +#endif + long current_tick = 0; extern void button_tick(void); @@ -77,8 +83,19 @@ void init_threads(void) /* get mutex to only allow one thread running at a time */ pthread_mutex_lock(&mp); + /* start a tick thread */ pthread_create(&tick_tid, NULL, (void *(*)(void *)) update_tick_thread, NULL); + +#ifdef ROCKBOX_HAS_SIMSOUND /* start thread that plays PCM data */ + { + pthread_t sound_tid; + pthread_create(&sound_tid, NULL, + (void *(*)(void *)) sound_playback_thread, + NULL); + } +#endif + } /* int pthread_create(pthread_t *new_thread_ID, |