summaryrefslogtreecommitdiff
path: root/apps/codecs/spc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/spc.c')
-rw-r--r--apps/codecs/spc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c
index 380cfbdb8b..14d28dfca8 100644
--- a/apps/codecs/spc.c
+++ b/apps/codecs/spc.c
@@ -197,7 +197,7 @@ static int spc_emu_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)]
197 CACHEALIGN_ATTR; 197 CACHEALIGN_ATTR;
198 198
199static const unsigned char * const spc_emu_thread_name = "spc emu"; 199static const unsigned char * const spc_emu_thread_name = "spc emu";
200static struct thread_entry *emu_thread_p; 200static unsigned int emu_thread_id = 0;
201 201
202enum 202enum
203{ 203{
@@ -352,11 +352,11 @@ static void spc_emu_thread(void)
352 352
353static bool spc_emu_start(void) 353static bool spc_emu_start(void)
354{ 354{
355 emu_thread_p = ci->create_thread(spc_emu_thread, spc_emu_thread_stack, 355 emu_thread_id = ci->create_thread(spc_emu_thread, spc_emu_thread_stack,
356 sizeof(spc_emu_thread_stack), CREATE_THREAD_FROZEN, 356 sizeof(spc_emu_thread_stack), CREATE_THREAD_FROZEN,
357 spc_emu_thread_name IF_PRIO(, PRIORITY_PLAYBACK), COP); 357 spc_emu_thread_name IF_PRIO(, PRIORITY_PLAYBACK), COP);
358 358
359 if (emu_thread_p == NULL) 359 if (emu_thread_id == 0)
360 return false; 360 return false;
361 361
362 /* Initialize audio queue as full to prevent emu thread from trying to run the 362 /* Initialize audio queue as full to prevent emu thread from trying to run the
@@ -368,7 +368,7 @@ static bool spc_emu_start(void)
368 sample_queue.tail = 2; 368 sample_queue.tail = 2;
369 369
370 /* Start it running */ 370 /* Start it running */
371 ci->thread_thaw(emu_thread_p); 371 ci->thread_thaw(emu_thread_id);
372 return true; 372 return true;
373} 373}
374 374
@@ -382,10 +382,10 @@ static inline int load_spc_buffer(uint8_t *buf, size_t size)
382 382
383static inline void spc_emu_quit(void) 383static inline void spc_emu_quit(void)
384{ 384{
385 if (emu_thread_p != NULL) { 385 if (emu_thread_id != 0) {
386 emu_thread_send_msg(SPC_EMU_QUIT, 0); 386 emu_thread_send_msg(SPC_EMU_QUIT, 0);
387 /* Wait for emu thread to be killed */ 387 /* Wait for emu thread to be killed */
388 ci->thread_wait(emu_thread_p); 388 ci->thread_wait(emu_thread_id);
389 invalidate_icache(); 389 invalidate_icache();
390 } 390 }
391} 391}