mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
3d3a144cf6
commit
da6cebb6b0
13 changed files with 244 additions and 132 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue