summaryrefslogtreecommitdiff
path: root/apps/dsp.c
AgeCommit message (Collapse)Author
2011-10-26Revert swap channel feature as we're presently in a feature freeze. I'll ↵Michael Giacomelli
recommit after the release is branched. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30841 a1c6a512-1295-4272-9138-f99709370657
2011-10-26Add option to exchange the left and right stereo channels. Patch by Dave ↵Michael Giacomelli
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-21Implement move callback for timestretch sample allocation.Fred Bauer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30813 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg
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-05Clean up compressor setting codeJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30715 a1c6a512-1295-4272-9138-f99709370657
2011-09-02Sanify dsp.c (re)sample buffer indirection.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30409 a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Enable compaction in buflib.Thomas Martitz
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-30GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz
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-04-04Rework parts of the replaygain code to be able to differentiate between 0.00 ↵Andree Buschmann
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-03-31Changing convert_gain() also implicitly changed get_replaygain_int() which ↵Andree Buschmann
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-03Fix peak handling in replaygain (FS#11981). This bug was introduced with ↵Andree Buschmann
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-02-24FS#11964. Rework replaygain handling to save metadata buffer and binsize. ↵Andree Buschmann
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
2010-09-24Make sure the dsp code has proper resample buffers even if HAVE_PITCHSCREEN ↵Frank Gevaerts
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-17Make disabling HAVE_PITCHSCREEN actually work without breaking the buildFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
2010-02-24Partially revert svn r24888 that causes build failure on coldfire targetsBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24889 a1c6a512-1295-4272-9138-f99709370657
2010-02-24Kill some global variablesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24888 a1c6a512-1295-4272-9138-f99709370657
2009-11-04Compressor: simplify makeup gain setting, expand release range, finally ↵Jeffrey Goode
provide documention in the manual! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23518 a1c6a512-1295-4272-9138-f99709370657
2009-11-02Tweak logf statementsJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23486 a1c6a512-1295-4272-9138-f99709370657
2009-10-22Code cleanup in dsp.c and misc.c, some commentsJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23314 a1c6a512-1295-4272-9138-f99709370657
2009-10-19Compressor: save lots of RAM, bug fix to work with internally clipped samplesJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23268 a1c6a512-1295-4272-9138-f99709370657
2009-10-03Cleanup some logf info in dsp_set_compressorJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22890 a1c6a512-1295-4272-9138-f99709370657
2009-09-25Fix yellow: braces around logf statementsJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22834 a1c6a512-1295-4272-9138-f99709370657
2009-09-25Replace limiter with dynamic range compressorJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22832 a1c6a512-1295-4272-9138-f99709370657
2009-09-21Fix red: remove buffer from IRAMJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22773 a1c6a512-1295-4272-9138-f99709370657
2009-09-21Potential fix for FS#10572: limiter + time stretch produces garbage outputJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22772 a1c6a512-1295-4272-9138-f99709370657
2009-09-19Performance improvement in limiter, about 2%Jeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22735 a1c6a512-1295-4272-9138-f99709370657
2009-09-18Fix subtle bug in limiterJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22725 a1c6a512-1295-4272-9138-f99709370657
2009-08-18FS#10199: Adds limiter DSP functionJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22394 a1c6a512-1295-4272-9138-f99709370657
2009-08-12FS#10446: Bug defense in dsp.c, minor tweaks and commentsJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22282 a1c6a512-1295-4272-9138-f99709370657
2009-08-01 * Move DSP_CALLBACK_* enum to sound.hMaurus Cuelenaere
* 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-07-11Improvements to the pitch screen UI (FS#10359 by David Johnston)Alexander Levin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21781 a1c6a512-1295-4272-9138-f99709370657
2009-07-05Take 2 at 'Consolidate all fixed point math routines in one library' ↵Maurus Cuelenaere
(FS#10400) by Jeffrey Goode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21664 a1c6a512-1295-4272-9138-f99709370657
2009-07-04Revert "Consolidate all fixed point math routines in one library (FS#10400) ↵Maurus Cuelenaere
by Jeffrey Goode" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21635 a1c6a512-1295-4272-9138-f99709370657
2009-07-04Consolidate all fixed point math routines in one library (FS#10400) by ↵Maurus Cuelenaere
Jeffrey Goode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21633 a1c6a512-1295-4272-9138-f99709370657
2009-06-20 Merge the "Replaygain Off" option into the replaygain type; eliminate the ↵Alexander Levin
"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-17Fix silly typo in comment, but nothing more.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21318 a1c6a512-1295-4272-9138-f99709370657
2009-06-17Rework internal timestretch enable/disable code - fix FS#10341(hopefully).Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21317 a1c6a512-1295-4272-9138-f99709370657
2009-06-16Renamed routines and changed comments for clarity.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21309 a1c6a512-1295-4272-9138-f99709370657
2009-06-16Get rid of tdspeed_enabled in struct dsp_config and use the global_settings ↵Thomas Martitz
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-15Fix FS#10331 and get mpegplayer working again.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21293 a1c6a512-1295-4272-9138-f99709370657
2009-06-12FS#8894 - Add time stretching feature to all SWCODEC targets - the current ↵Steve Bavin
algorithm is best for spoken word. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21258 a1c6a512-1295-4272-9138-f99709370657
2008-09-08Something horrible happened with binsize, so revert FS#8894 completely (for ↵Steve Bavin
now). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18449 a1c6a512-1295-4272-9138-f99709370657
2008-09-08Add timestretching from FS#8894, as written by Stephane Doyon based on work ↵Steve Bavin
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-07-07Fix FS #8361 - Custom stereo width reset by changing treble on e200. Thanks ↵Dan Everton
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-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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-05-03Made source files #include the header file that they implement to make sure ↵Bertrik Sikken
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-04-08Remove FRACMUL_8_LOOP macro. This only benefited Coldfire, and we have ↵Thom Johansen
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-08Remove ACC_INIT, ACC and GET_ACC macros. These were quite Coldfire-centric ↵Thom Johansen
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-03-20Turnaround time must be included in dsp yielding to throttle against other ↵Michael Sevakis
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-19Commit FS#8750. Add ARM assembler for the dsp-functions ↵Andree Buschmann
channels_process_sound_chan_mono(), channels_process_sound_chan_karaoke(), sample_output_mono() and sample_output_stereo(). By measurement the speed up is ~75% for the first three functions and ~40% for sample_output_stereo(). Additionally avoid calling yield() to often in dsp.c -- it is now limited to once per tick. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16717 a1c6a512-1295-4272-9138-f99709370657