summaryrefslogtreecommitdiff
path: root/firmware/include
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 /firmware/include
parent3d3a144cf68186fd34f7bf11181b7757c7a6018d (diff)
downloadrockbox-da6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40.zip
rockbox-da6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40.tar.gz
rockbox-da6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40.tar.bz2
rockbox-da6cebb6b0b17b4a75a2bd4f51b7cf70b5dafe40.tar.xz
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 'firmware/include')
-rw-r--r--firmware/include/buflib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h
index 9cd7c0b..6c9ccf7 100644
--- a/firmware/include/buflib.h
+++ b/firmware/include/buflib.h
@@ -103,6 +103,12 @@ struct buflib_callbacks {
* at least shrinkable
*/
int (*shrink_callback)(int handle, unsigned hints, void* start, size_t old_size);
+ /**
+ * This is called when special steps must be taken for synchronization
+ * both before the move_callback is called and after the data has been
+ * moved.
+ */
+ void (*sync_callback)(int handle, bool sync_on);
};
#define BUFLIB_SHRINK_POS_MASK ((1<<0|1<<1)<<30)