1
0
Fork 0
forked from len0rd/rockbox
foxbox/firmware/common
Thomas Martitz d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.

Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.

audiobuf and audiobufend are local to buffer.c now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 15:13:00 +00:00
..
config.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
crc32-mi4.c Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
crc32.c Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
diacritic.c FS#11187 - diacritic.c is in 'drivers' but it does not belong there 2010-04-07 20:41:18 +00:00
dir_uncached.c Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead. 2011-02-02 17:43:32 +00:00
dircache.c GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions. 2011-08-14 15:13:00 +00:00
disk.c iPod Classic CE-ATA Support (Part 2 of 4: Remove on-stack sector buffers, and replace them with a single statically allocated sector buffer that's arbitrated amongst users) 2011-02-27 22:44:54 +00:00
ffs.c Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
file.c Dircache: Don't expose struct dircache_entry and pointers into the cache, use IDs instead. 2011-06-20 20:12:42 +00:00
filefuncs.c Dircache: Don't expose struct dircache_entry and pointers into the cache, use IDs instead. 2011-06-20 20:12:42 +00:00
format.c format/*printf: Add simple support for %p format specifier. 2011-08-04 10:44:41 +00:00
memset16.c Move memset6() declaration to string-extra.h, kills a warning compiling for android since it ships a memory.h. 2010-08-12 13:55:01 +00:00
rbpaths.c RaaA: Fix write locations of plugins 2011-03-02 23:43:54 +00:00
strcasecmp.c Optimize (size and speed) strncasecmp (based on a newlib patch). 2010-02-07 00:37:47 +00:00
strcasestr.c Added ID3 searching 2005-01-27 22:21:08 +00:00
strlcat.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
strlcpy.c Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes). 2010-05-06 21:04:40 +00:00
strnatcmp.c Remove tabs in firmware path (taking into account the original spacing). 2010-02-22 21:24:09 +00:00
structec.c Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
timefuncs.c Return -1 for not implemented RTC functions. 2011-03-08 21:36:47 +00:00
unicode.c Rockbox as an application: add get_user_file_path(). 2010-08-01 16:15:27 +00:00
version.c Don't autogenerate version.c. Just version.h is enough 2010-06-21 00:18:29 +00:00