summaryrefslogtreecommitdiff
path: root/firmware/buffer.c (follow)
Commit message (Collapse)AuthorAge
* FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero2011-11-29
| | | | | | core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
* Fix errors and warnings.Thomas Martitz2011-08-14
| | | | | | | The buffer_offset paramter of audio_init_recording() is removed as it was unused in both implementations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz2011-08-14
| | | | | | | | | | | | | | | | | | | | | | | 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
* Workaround/fix (I'm not sure!) for buffer_alloc() returning unaligned ↵Frank Gevaerts2011-06-21
| | | | | | addresses in case other parts of the code increase audiobuf behind buffer.c's back. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30049 a1c6a512-1295-4272-9138-f99709370657
* Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM ↵Andree Buschmann2011-02-02
| | | | | | (code), use the already defined MEMORYSIZE instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
* If BUFFER_ALLOC_DEBUG is defined, make buffer_alloc() not actually allocate ↵Frank Gevaerts2010-09-26
| | | | | | anything if size==0, so code that uses buffer_alloc(0) to find out what address it would get keeps working git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28174 a1c6a512-1295-4272-9138-f99709370657
* Add optional (define BUFFER_ALLOC_DEBUG to enable it) code to check for code ↵Frank Gevaerts2010-09-26
| | | | | | | | | overflowing buffer_alloc()-allocated buffers. Also add a panicf() if buffer_alloc() doesn't have enough space left to allocate a requested buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28173 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen2006-09-16
| | | | | | | | | | switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
* Always align allocated buffers on 32-bit boundariesLinus Nielsen Feltzing2006-08-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10391 a1c6a512-1295-4272-9138-f99709370657
* mp3buf renamed to audiobufLinus Nielsen Feltzing2005-04-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6252 a1c6a512-1295-4272-9138-f99709370657
* Simulators: Made the mp3 buffer size depend on the MEMORYSIZE setting for ↵Jens Arnold2005-02-11
| | | | | | better simulation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5922 a1c6a512-1295-4272-9138-f99709370657
* Increased the mp3 buffer for the simulator, to avoid crash when running the ↵Linus Nielsen Feltzing2004-01-13
| | | | | | Xing header generator git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4223 a1c6a512-1295-4272-9138-f99709370657
* More linker safe MP3 buffer handling in the simulatorLinus Nielsen Feltzing2003-10-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3972 a1c6a512-1295-4272-9138-f99709370657
* Configurable dir browser file buffer size. No more 400-file limit. No more ↵Linus Nielsen Feltzing2003-05-09
whining. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3661 a1c6a512-1295-4272-9138-f99709370657