From da6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 2 May 2012 17:22:28 -0400 Subject: Use buflib for the allocation of voice PCM resources. Buffers are not allocated and thread is not created until the first call where voice is required. Adds a different callback (sync_callback) to buflib so that other sorts of synchonization are possible, such as briefly locking-out the PCM callback for a buffer move. It's sort of a messy addition but it is needed so voice decoding won't have to be stopped when its buffer is moved. Change-Id: I4d4d8c35eed5dd15fb7ee7df9323af3d036e92b3 --- apps/voice_thread.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/voice_thread.h') diff --git a/apps/voice_thread.h b/apps/voice_thread.h index e886304..64c20c1 100644 --- a/apps/voice_thread.h +++ b/apps/voice_thread.h @@ -23,7 +23,10 @@ #include "config.h" +#ifndef MP3_PLAY_CALLBACK_DEFINED +#define MP3_PLAY_CALLBACK_DEFINED typedef void (*mp3_play_callback_t)(const void **start, size_t *size); +#endif void mp3_play_data(const void *start, size_t size, mp3_play_callback_t get_more); @@ -39,6 +42,4 @@ void voice_thread_init(void) INIT_ATTR; void voice_thread_set_priority(int priority); #endif -size_t voicebuf_init(void *bufend); - #endif /* VOICE_THREAD_H */ -- cgit v1.1