Commit graph

143 commits

Author SHA1 Message Date
Bertrik Sikken
e71750b7a3 Make local functions and variables static where possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30897 a1c6a512-1295-4272-9138-f99709370657
2011-11-03 23:32:49 +00:00
Michael Giacomelli
b25cd7d892 Revert swap channel feature as we're presently in a feature freeze. I'll recommit after the release is branched.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30841 a1c6a512-1295-4272-9138-f99709370657
2011-10-26 18:37:50 +00:00
Michael Giacomelli
5c4bd11d91 Add option to exchange the left and right stereo channels. Patch by Dave Chapman and Martin Sägmüller. Also add manual entry (by Michael Giacomelli). Note that this setting will confuse non-software effect options like channel balance. This should be addressed in a future commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30837 a1c6a512-1295-4272-9138-f99709370657
2011-10-26 18:18:34 +00:00
Fred Bauer
d228d4d130 Implement move callback for timestretch sample allocation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30813 a1c6a512-1295-4272-9138-f99709370657
2011-10-21 17:47:58 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Jeffrey Goode
a604345ae1 Clean up compressor setting code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30715 a1c6a512-1295-4272-9138-f99709370657
2011-10-05 04:44:56 +00:00
Michael Sevakis
194bc59478 Sanify dsp.c (re)sample buffer indirection.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30409 a1c6a512-1295-4272-9138-f99709370657
2011-09-02 16:29:26 +00:00
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
Andree Buschmann
d1766a1510 Rework parts of the replaygain code to be able to differentiate between 0.00 dB set intentionally and having no replaygain information at all. Bump codec api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29679 a1c6a512-1295-4272-9138-f99709370657
2011-04-04 15:21:44 +00:00
Andree Buschmann
29164ccbcc Changing convert_gain() also implicitly changed get_replaygain_int() which could lead to div by zero. This patch finds another way to fix the replaygain fallback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29665 a1c6a512-1295-4272-9138-f99709370657
2011-03-31 21:46:09 +00:00
Andree Buschmann
708f5508ad Fix peak handling in replaygain (FS#11981). This bug was introduced with r29388 and is caused by calling convert_gain() for peak values. This results in very low output volume if 'Prevent Clipping' is enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29509 a1c6a512-1295-4272-9138-f99709370657
2011-03-03 07:23:25 +00:00
Andree Buschmann
71ceac0b74 FS#11964. Rework replaygain handling to save metadata buffer and binsize. Remove string representation of replaygain and use a dedicated ftoa implementation for WPS/screen info.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29388 a1c6a512-1295-4272-9138-f99709370657
2011-02-24 19:10:59 +00:00
Frank Gevaerts
8458fade58 Make sure the dsp code has proper resample buffers even if HAVE_PITCHSCREEN is undefined. This makes playback work again without HAVE_PITCHSCREEN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28158 a1c6a512-1295-4272-9138-f99709370657
2010-09-24 22:14:10 +00:00
Frank Gevaerts
f366090562 Make disabling HAVE_PITCHSCREEN actually work without breaking the build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:28:47 +00:00
Bertrik Sikken
ef925134c9 Partially revert svn r24888 that causes build failure on coldfire targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24889 a1c6a512-1295-4272-9138-f99709370657
2010-02-24 19:52:39 +00:00
Bertrik Sikken
2ac91dcd98 Kill some global variables
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24888 a1c6a512-1295-4272-9138-f99709370657
2010-02-24 19:40:45 +00:00
Jeffrey Goode
95e2d72759 Compressor: simplify makeup gain setting, expand release range, finally provide documention in the manual!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23518 a1c6a512-1295-4272-9138-f99709370657
2009-11-04 18:14:36 +00:00
Jeffrey Goode
582225967f Tweak logf statements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23486 a1c6a512-1295-4272-9138-f99709370657
2009-11-02 15:50:56 +00:00
Jeffrey Goode
faa47bf1b7 Code cleanup in dsp.c and misc.c, some comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23314 a1c6a512-1295-4272-9138-f99709370657
2009-10-22 00:59:42 +00:00
Jeffrey Goode
c8fa54ecfa Compressor: save lots of RAM, bug fix to work with internally clipped samples
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23268 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 19:40:12 +00:00
Jeffrey Goode
78d2c1bc25 Cleanup some logf info in dsp_set_compressor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22890 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 13:05:28 +00:00
Jeffrey Goode
bcd890d7bb Fix yellow: braces around logf statements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22834 a1c6a512-1295-4272-9138-f99709370657
2009-09-25 15:56:09 +00:00
Jeffrey Goode
cf19ba5599 Replace limiter with dynamic range compressor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22832 a1c6a512-1295-4272-9138-f99709370657
2009-09-25 15:46:38 +00:00
Jeffrey Goode
a4a24999d9 Fix red: remove buffer from IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22773 a1c6a512-1295-4272-9138-f99709370657
2009-09-21 17:45:56 +00:00
Jeffrey Goode
81f268ad48 Potential fix for FS#10572: limiter + time stretch produces garbage output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22772 a1c6a512-1295-4272-9138-f99709370657
2009-09-21 17:04:40 +00:00
Jeffrey Goode
b2aa2452e7 Performance improvement in limiter, about 2%
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22735 a1c6a512-1295-4272-9138-f99709370657
2009-09-19 00:12:02 +00:00
Jeffrey Goode
7337fd332f Fix subtle bug in limiter
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22725 a1c6a512-1295-4272-9138-f99709370657
2009-09-18 01:23:43 +00:00
Jeffrey Goode
2b7ef6b928 FS#10199: Adds limiter DSP function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22394 a1c6a512-1295-4272-9138-f99709370657
2009-08-18 03:24:45 +00:00
Jeffrey Goode
e3f36a1f47 FS#10446: Bug defense in dsp.c, minor tweaks and comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22282 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 19:00:31 +00:00
Maurus Cuelenaere
3c7c79189e * Move DSP_CALLBACK_* enum to sound.h
* Add software based volume control for a certain range (SW_VOLUME_MIN -> SW_VOLUME_MAX)
 * Make Onda VX747 use it
 * Don't change volume or frequency in Ingenic Jz4740 codec driver when they're already set


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22106 a1c6a512-1295-4272-9138-f99709370657
2009-08-01 21:38:18 +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
Maurus Cuelenaere
802743a061 Take 2 at 'Consolidate all fixed point math routines in one library' (FS#10400) by Jeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21664 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 18:06:07 +00:00
Maurus Cuelenaere
c3bc8fda80 Revert "Consolidate all fixed point math routines in one library (FS#10400) by Jeffrey Goode"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21635 a1c6a512-1295-4272-9138-f99709370657
2009-07-04 13:17:58 +00:00
Maurus Cuelenaere
4710a32800 Consolidate all fixed point math routines in one library (FS#10400) by Jeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21633 a1c6a512-1295-4272-9138-f99709370657
2009-07-04 12:26:45 +00:00
Alexander Levin
8589fcb3e3 Merge the "Replaygain Off" option into the replaygain type; eliminate the "On/Off" setting (FS#10356). All WPS tags should work as before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21414 a1c6a512-1295-4272-9138-f99709370657
2009-06-20 21:13:24 +00:00
Steve Bavin
bb8244a176 Fix silly typo in comment, but nothing more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21318 a1c6a512-1295-4272-9138-f99709370657
2009-06-17 11:30:34 +00:00
Steve Bavin
6264941776 Rework internal timestretch enable/disable code - fix FS#10341(hopefully).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21317 a1c6a512-1295-4272-9138-f99709370657
2009-06-17 11:19:51 +00:00
Steve Bavin
d6ad019af3 Renamed routines and changed comments for clarity.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21309 a1c6a512-1295-4272-9138-f99709370657
2009-06-16 07:10:05 +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
f6982346a1 Add timestretching from FS#8894, as written by Stephane Doyon based on work by Nicolas Pitre. Shouldn't affect playback unless it's explicitly enabled, but let me know if it does. Currently has a dedicated setting, but maybe inclusion of the code will inspire someone to integrate this with the pitch screen...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18446 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 08:27:51 +00:00
Dan Everton
0229e94545 Fix FS #8361 - Custom stereo width reset by changing treble on e200. Thanks to Tomer Shalev for the investigation work and the patch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17976 a1c6a512-1295-4272-9138-f99709370657
2008-07-07 08:11:52 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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
2008-06-28 18:10:04 +00:00
Bertrik Sikken
e15f8a21a9 Made source files #include the header file that they implement to make sure they are in sync. Made some local functions static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17312 a1c6a512-1295-4272-9138-f99709370657
2008-05-03 08:35:14 +00:00
Thom Johansen
18fc7fd654 Remove FRACMUL_8_LOOP macro. This only benefited Coldfire, and we have assembler routines for the gain function there now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17040 a1c6a512-1295-4272-9138-f99709370657
2008-04-08 21:44:07 +00:00
Thom Johansen
66427c3e47 Remove ACC_INIT, ACC and GET_ACC macros. These were quite Coldfire-centric macros which really aren't needed since all performance sensitive target DSP code should be assembler anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17037 a1c6a512-1295-4272-9138-f99709370657
2008-04-08 20:02:56 +00:00
Michael Sevakis
d3ecbbf988 Turnaround time must be included in dsp yielding to throttle against other threads. Do at least one per buffer full as well (or things can stick a bit on initial input triggers).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16721 a1c6a512-1295-4272-9138-f99709370657
2008-03-20 17:03:57 +00:00