summaryrefslogtreecommitdiff
path: root/apps/recorder/peakmeter.c (follow)
Commit message (Collapse)AuthorAge
* Clean up peak calculating code.Michael Sevakis2012-05-02
| | | | | | | | | | | | | | Mixer needn't keep peak data around that will never be used. Just pass pcm_peaks structure to it instead of allocating for every channel. Plugin API becomes incompatible. vu_meter digital mode was still using global peak calculation; switch it to playback channel like the rest. Remove some accumulated soil peaks inside pcm.c and make it more generic. Change-Id: Ib4d268d80b6a9d09915eea1c91eab483c1a2c009
* Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg2011-10-15
| | | | | | 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
* Make function calc_db in peakmeter.c staticBertrik Sikken2011-10-04
| | | | | | Remove some unneeded #include "peakmeter.h" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30713 a1c6a512-1295-4272-9138-f99709370657
* Use playback channel directly for peakmeters and plugins using peak ↵Michael Sevakis2011-07-02
| | | | | | calculation. Also, for now, don't allow mixer playback to overlap recording, even if full duplex works. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
* Make the histogram code usable for playback as well. Move the recording ↵Peter D'Hoye2011-06-05
| | | | | | histogram code to peakmeter, rename it to remove the recording reference, and rename anything referring to it as well. Change the drawing code so there are more options to position them. This may change your histogram settings, so check after upgrading. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29969 a1c6a512-1295-4272-9138-f99709370657
* FS#11867 - Add 2 new tags to allow skins to display themed peakmetersJonathan Gordon2011-01-13
| | | | | | | %pL for the left channel, %pR for the right channel... usable as a value, conditional or bar (exactly the same as %pv/%bl/etc) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29043 a1c6a512-1295-4272-9138-f99709370657
* Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. ↵Marcin Bukat2010-10-31
| | | | | | FS#11189 by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
* I shouldn't have touched backlight.c at all :\ Also fix the yellow in ↵Thomas Martitz2010-06-21
| | | | | | peakmeter.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27022 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
* slightly rework peakmeter handling to make it cleaner and be able to be used ↵Jonathan Gordon2010-05-09
| | | | | | in conditionals git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25913 a1c6a512-1295-4272-9138-f99709370657
* Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz2010-05-06
| | | | | | | | directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
* Histogram display on recording screen. Based on the work of Jvo Studer in FS ↵Peter D'Hoye2010-03-03
| | | | | | #5021 but reduced and reworked since the recording screen code changed quite a bit since his patch. For now enabled on iriver h1x0 and h3x0 only. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25007 a1c6a512-1295-4272-9138-f99709370657
* Clean up some unused #includesBertrik Sikken2009-05-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20975 a1c6a512-1295-4272-9138-f99709370657
* continuation of last nights statusbar cleanup.Jonathan Gordon2009-02-02
| | | | | | | | accept FS#9858 and FS#9859 make the rec and fm screens force the statusbar the correct way now which doesnt need extra status variables git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19904 a1c6a512-1295-4272-9138-f99709370657
* Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts2008-11-01
| | | | | | | | | that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
* First step of the recording screen redesign. The screen is split into a ↵Peter D'Hoye2008-08-06
| | | | | | fixed top part containing essential data and the peakmeters/triggerbar, and a bottom part that is in fact a list. The list contains the items that can be changed, and also some stuff that isn't important enough to be on the top part, like the filename. That filename is now shown completely. If the font is too big to have 6 lines on the display, sysfont is used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18202 a1c6a512-1295-4272-9138-f99709370657
* Implement FS#8947 - Add a stub in the simulator for ata_disk_is_active. This ↵Bertrik Sikken2008-07-03
| | | | | | make it possible to clean up some #ifdef SIMULATOR macros. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17927 a1c6a512-1295-4272-9138-f99709370657
* Fix FS #9128: invalidate the peakmeter scales when switching between ↵Peter D'Hoye2008-06-29
| | | | | | playback and recording. This causes them to be recalculated so they show up correctly when playback and recording use different viewport sizes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17869 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
* Peakmeters: use screens[].getwidth() and not screens[].width as the latter ↵Peter D'Hoye2008-06-28
| | | | | | one returns the LCD width (which really shouldn't be there) - the former returns the width of the viewport. Do some code police as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17841 a1c6a512-1295-4272-9138-f99709370657
* Fix broken peakmeters: peakmeter was using viewport drawing code but ↵Peter D'Hoye2008-06-28
| | | | | | absolute screen coordinates for display updating. To Do: peakmeter must completely use viewport info for its updates. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17838 a1c6a512-1295-4272-9138-f99709370657
* Updated recording trigger screen (seems to be a feature almost noone uses?)Jonathan Gordon2008-05-28
| | | | | | | | problems/complaints in http://forums.rockbox.org/index.php?topic=16837.0 there is a known issue that on this screen the stop icon wont update, I dont know why and noone else wants to look at it, so hopefully this will force another set of eyes on it.. this is only a graphical issue... recordings still work fine git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17643 a1c6a512-1295-4272-9138-f99709370657
* Killed unnecessary global variables by making them static.Bertrik Sikken2008-04-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17184 a1c6a512-1295-4272-9138-f99709370657
* Commit viewports-in-WPS patch (FS#8385). This adds the %V tag - see the ↵Dave Chapman2008-03-21
| | | | | | CustomWPS page for details (shortly...). There is still some work to do - decide how to handle font references, decide how to handle conditionals. Plus checkwps is broken - I'll fix that in a separate commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16733 a1c6a512-1295-4272-9138-f99709370657
* Simplify that clip indicator reset code a bitPeter D'Hoye2008-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16559 a1c6a512-1295-4272-9138-f99709370657
* Fix FS #8514 (remote peakmeter issue) by separating the peak release times ↵Peter D'Hoye2008-02-06
| | | | | | for the screens. Thanks to amiconn for pointing in the right direction. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16234 a1c6a512-1295-4272-9138-f99709370657
* Disable highperf mode in the peakmeter for swcodec targets, as it makes no ↵Jens Arnold2007-10-16
| | | | | | sense. Improves responsiveness a lot with a peakmeter-enabled wps on targets with slow lcd updates (e.g. G5). Added a comment why highperf mode is needed for MAS targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15140 a1c6a512-1295-4272-9138-f99709370657
* Unify PCM interface just above the hardware driver level for all targets ↵Michael Sevakis2007-10-06
| | | | | | including the sims. Perform lockout of audio callback when changing states. Weird new playback or recording trouble? Check before and after this revision first though things seem quite sound. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15006 a1c6a512-1295-4272-9138-f99709370657
* Make a few private functins static and use fewer bytes for constantsNils Wallménius2007-09-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14783 a1c6a512-1295-4272-9138-f99709370657
* Make peakmeters work for real in swcodec simulators instead of just showing ↵Jens Arnold2007-09-09
| | | | | | random movement. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14650 a1c6a512-1295-4272-9138-f99709370657
* only build the clipcounter for targets with recordingPeter D'Hoye2007-08-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14467 a1c6a512-1295-4272-9138-f99709370657
* Implement FS #2976: Clip Counter for recording screen. If enabled in peak ↵Peter D'Hoye2007-08-25
| | | | | | meter settings, it shows the number of times clipping occurred (clip indicator going on). Count is reset on recording start and only counts during actual recording. Stays on screen when stopping or pauzing. Also fix a drawing bug when peakmeters start at a non-zero x offset. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14455 a1c6a512-1295-4272-9138-f99709370657
* Make peak release work per tick as intended. But that's too fast, so it's ↵Jens Arnold2007-08-20
| | | | | | not the final solution. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14397 a1c6a512-1295-4272-9138-f99709370657
* Make peakmeter release setting work in units per tick (was units per read), ↵Peter D'Hoye2007-08-18
| | | | | | add the unit and make it voiced. Make old leftover in lang file deprecated git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14390 a1c6a512-1295-4272-9138-f99709370657
* Moved archos backlight code to target tree. Changed old mutlivalue ↵Jens Arnold2007-04-12
| | | | | | CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
* Draw peakmeter scale marks in foreground color instead of inversed ↵Nils Wallménius2007-03-19
| | | | | | background color, fixes FS #6855 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12840 a1c6a512-1295-4272-9138-f99709370657
* Fix CONFIG_BACKLIGHT warnings.Jens Arnold2007-02-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12393 a1c6a512-1295-4272-9138-f99709370657
* Next round of static'ing and related fixes.Jens Arnold2006-12-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11836 a1c6a512-1295-4272-9138-f99709370657
* Recording trigger for software codec targetsMartin Scarratt2006-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11479 a1c6a512-1295-4272-9138-f99709370657
* Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis2006-11-06
| | | | | | SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
* Button action code for recording screen. Shouldnt make any noticable ↵Martin Scarratt2006-08-20
| | | | | | difference in recording screen button operation except for H300 I-River remote, which should now work as expected, -10 button = LCD off git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10666 a1c6a512-1295-4272-9138-f99709370657
* Guard against division by zero in the peak meter (the settings menu allows ↵Magnus Holmgren2006-08-17
| | | | | | the user the set range min and max to the same value; maybe that should be changed too). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10631 a1c6a512-1295-4272-9138-f99709370657
* Automatic Gain Control during recording. At this point only compiled for ↵Peter D'Hoye2006-08-16
| | | | | | iriver h1x0 and h3x0. Patch FS#4748 by Jvo Studer, Martin Scarratt and myself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10625 a1c6a512-1295-4272-9138-f99709370657
* I-River targets: A workaround for the recording interference hardware issue ↵Martin Scarratt2006-07-31
| | | | | | when recording with a remote. Disable remote LCD while recording by pressing vol- on the remote. All remote buttons and cliplight are still operational while lcd is disabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10376 a1c6a512-1295-4272-9138-f99709370657
* On-the-fly filesplitting when recording for I-Rivers. Record button starts ↵Martin Scarratt2006-07-20
| | | | | | new file, Play/Pause button pauses/resumes recording. Also, Filename information for all screens > 80 pixels high. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10270 a1c6a512-1295-4272-9138-f99709370657
* Completed implementation of display GUI code for recording and peakmeterMartin Scarratt2006-07-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10249 a1c6a512-1295-4272-9138-f99709370657
* Increased peakmeter accuracy in the (for recording important) -12 to 0 dB ↵Peter D'Hoye2006-07-02
| | | | | | range. Patch 5022 by Jvo Studer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10177 a1c6a512-1295-4272-9138-f99709370657
* Patch #4999 by Matthias Mohr - Peakmeter scaling dots does not respect ↵Linus Nielsen Feltzing2006-04-03
| | | | | | x-offset in peak_meter_draw git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9450 a1c6a512-1295-4272-9138-f99709370657
* Support the recording screen on the LCD remote. Also adds support for the ↵Dan Everton2006-03-25
| | | | | | peakmeter in the rremote WPS. Patch from Martin Scarratt (task 4818). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9246 a1c6a512-1295-4272-9138-f99709370657
* Make clipping detection more sensitive for swcodec platforms by triggering ↵Peter D'Hoye2006-03-08
| | | | | | on the first peak value git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8962 a1c6a512-1295-4272-9138-f99709370657