summaryrefslogtreecommitdiff
path: root/apps/voice_thread.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-05-02 17:22:28 -0400
committerMichael Sevakis <jethead71@rockbox.org>2012-05-02 17:22:28 -0400
commitda6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40 (patch)
treedf0eb18120c38ec7b08d3ae1e0837f0781065e87 /apps/voice_thread.h
parent3d3a144cf68186fd34f7bf11181b7757c7a6018d (diff)
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
Diffstat (limited to 'apps/voice_thread.h')
-rw-r--r--apps/voice_thread.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/voice_thread.h b/apps/voice_thread.h
index e88630439b..64c20c1e8d 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 */