Commit graph

11 commits

Author SHA1 Message Date
Thomas Martitz
baa070cca6 GSoC/Buflib: Enable compaction in buflib.
This enables the ability to allocate (and free) memory dynamically
without fragmentation, through compaction. This means allocations can move
and fragmentation be reduced. Most changes are preparing Rockbox for this,
which many times means adding a move callback which can temporarily disable
movement when the corresponding code is in a critical section.

For now, the audio buffer allocation has a central role, because it's the one
having allocated most. This buffer is able to shrink itself, for which it
needs to stop playback for a very short moment. For this,
audio_buffer_available() returns the size of the audio buffer which can
possibly be used by other allocations because the audio buffer can shrink.

lastfm scrobbling and timestretch can now be toggled at runtime without
requiring a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:45 +00:00
Thomas Martitz
d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:33 +00:00
Michael Sevakis
72213e6b1b Make tdspeed.c a bit nicer to read. No functional changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30378 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 07:42:22 +00:00
Alexander Levin
7765158513 Fix red in bootloaders
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21782 a1c6a512-1295-4272-9138-f99709370657
2009-07-11 17:16:23 +00:00
Alexander Levin
cc7c665d9b Improvements to the pitch screen UI (FS#10359 by David Johnston)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21781 a1c6a512-1295-4272-9138-f99709370657
2009-07-11 16:46:19 +00:00
Steve Bavin
40d9b218e5 Allow use of timestretch with semitones in the pitchscreen. Rename variables to clarify the meaning of 'speed'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21468 a1c6a512-1295-4272-9138-f99709370657
2009-06-22 18:52:14 +00:00
Thomas Martitz
cb57a568e8 Get rid of tdspeed_enabled in struct dsp_config and use the global_settings member instead. That one needs to be checked in tdspeed_init() as well, else the buffers are always allocated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21305 a1c6a512-1295-4272-9138-f99709370657
2009-06-16 00:59:24 +00:00
Steve Bavin
77f6f4caad Fix FS#10331 and get mpegplayer working again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21293 a1c6a512-1295-4272-9138-f99709370657
2009-06-15 15:46:09 +00:00
Steve Bavin
fb2380790e FS#8894 - Add time stretching feature to all SWCODEC targets - the current algorithm is best for spoken word.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21258 a1c6a512-1295-4272-9138-f99709370657
2009-06-12 07:20:50 +00:00
Steve Bavin
4bb8fd286b Something horrible happened with binsize, so revert FS#8894 completely (for now).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18449 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 09:00:41 +00:00
Steve Bavin
4553e41f0e Oops, I thought SVN commit would add these for some silly reason. Properties need setting still though..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18447 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 08:35:46 +00:00