summaryrefslogtreecommitdiffstats
path: root/apps/plugins/metronome.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-53/+2
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy1-194/+0
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24[2/4] get rid of HAVE_LCD_CHARCELLSSolomon Peachy1-5/+0
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2015-11-15YH8xx,YH9xx: Keymap improvementSebastian Leonhardt1-2/+1
The main "innovation" in this patch are two "virtual buttons" for the record switch on YH92x targets. When the switch state changes, a single BUTTON_REC_SW_ON or .._OFF button event will be generated. Thus keymap code can react on switching, but not on the actual state of the switch. Wherever sensible, the following user scheme is applied: - use PLAY as confirm button - use REW button or Long REW to exit - use REC (YH820) or FFWD (YH92X) as modifier key for button combos Change-Id: Ic8d1db9cc6869daed8dda98990dfdf7f6fd5d5a1
2015-02-03Enhancement of the metronome plugin:Thomas Orgis1-753/+1730
- square sine tick and tock sounds (more annoying, more useful;-) - optical indication of tics on display - unification of mode of operation for SWCODEC and HWCODEC (tested on simulator) Both playback and display drawing happen in main loop, always. - operating in two modes now: -- 1. classic dumb metronome --- active when openened as application without file to open --- the usual functionality with tapping and bpm change --- controls indicated on display -- 2. track mode with programmable series of parts --- active when started as viewer for a .tempo file --- differing meters (4/4, 3/4, 6/8, etc.) --- patterns (tick/tock/silence on each beat) --- smooth tempo changes in those tracks This version had lots of testing regarding metronome accuracy, resulting in the realization that PLL A and PLL B differ on the Clip+, causing drift. There is still drift when the timer intervall is too small, so I settled on 2 ms as compromise. This is the final version, after adding documentation and extensive help from Sebastian Leonhardt testing it on slower hardware (YH820), where it works up to 650 actual bpm with display indication. Latest change: Documentation nitpicks. Change-Id: I764c8252526db188352385c5462f9453d882beb9
2014-05-24Separate keymaps for YH-820 and YH-920/925Sebastian Leonhardt1-1/+2
Although both players basically have the same keys, the differences in the layout is rather big, so I think both deserve their own keymaps. (On the yh820 the FFWD/PLAY/REW buttons are located above the direction keys, on the yh920 at the side of the player. Furthermore the yh920/925 has a REC switch, whereas yh820 has a push button.) Change-Id: I0e62a1b101c387646c0bdb07ea142d9d2430ca15 Reviewed-on: http://gerrit.rockbox.org/814 Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
2012-03-04Tweak paramters of mp3_play_data and callback.Michael Sevakis1-1/+1
Use generic void * and size_t and make mp3_play_data and its callback agree on types. Use mp3_play_callback_t instead of prototyping right in the function call (so it's not so messy to look at). Change doesn't appear to require plugin API version increment. Change-Id: Idcab2740ee316a2beb6e0a87b8f4934d9d6b3dd8
2012-03-03Revise the PCM callback system after adding multichannel audio.Michael Sevakis1-1/+1
Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
2011-12-28plugins: another round of making local things static and adding missing ↵Bertrik Sikken1-2/+2
#includes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31453 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg1-1/+0
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-04plugins: make local functions static for metronome, rockblox1d, wavviewBertrik Sikken1-10/+10
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30711 a1c6a512-1295-4272-9138-f99709370657
2011-02-03Correct the metronome keymap in the manual. Better describe buttons/actions ↵Andree Buschmann1-2/+2
in metronome help text. Closes FS#11773. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29204 a1c6a512-1295-4272-9138-f99709370657
2010-08-24Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-20/+9
It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz1-9/+20
Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23Introduce plugin_crt0.c that every plugin links.Thomas Martitz1-20/+9
It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2010-07-01metronome: fix issue that backlight doesn't turn off.Teruaki Kawashima1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27218 a1c6a512-1295-4272-9138-f99709370657
2010-05-20S#10387 - Rework pluginlib actionsThomas Martitz1-64/+45
It changes pluginlib actions to contain only a single and simple context (and other one for remote directional buttons), consisting of 7(9) buttons: up/down/left/right, select OR short select and long select, exit and cancel (plus 2 for scrollwheel targets). This ensures contexts don't clash with other contexts and simplifies them, at the expense of reduced versatility. However, the versatility made it largely unusable due to the great number of targets. This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
2009-11-17Fix FS#10546 - metronome doesn't work on h1xx/h3xx.Torne Wuff1-2/+2
Button mapping table was wrong after some pluginlib_action changes a while ago. Same problem in the Ondio mappings, so I fixed that too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23658 a1c6a512-1295-4272-9138-f99709370657
2009-06-29Remove int_prio argument from timer_register, and move the only use for it ↵Rafaël Carré1-1/+1
into alpine_cdc plugin, since this plugin is only built on SH7034 Also remove it from TIMER_START() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657
2009-01-24remove MEM_FUNCTION_WRAPPERS, and private mem* implementations from plugins, ↵Andrew Mahone1-2/+0
and replace with pluginlib implementations in plugins/lib/gcc-support.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19847 a1c6a512-1295-4272-9138-f99709370657
2009-01-16loader-initialized global plugin API:Andrew Mahone1-7/+4
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
2008-11-25Delete unused var and slight style policeNils Wallménius1-10/+15
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19212 a1c6a512-1295-4272-9138-f99709370657
2008-11-20New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg1-1/+1
tree. Fully controlled dependencies give faster and more correct recompiles. Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-10-30Data does not belong in .h files. Not even if it makes the .c file prettier.Björn Stenberg1-1/+588
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18934 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
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-13Plugin parameters should be const.Steve Bavin1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
2008-04-12Optimise some more line drawing calls.Jens Arnold1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17083 a1c6a512-1295-4272-9138-f99709370657
2008-04-04Allow to select the core for running the user timer on portalplayer targets. ↵Jens Arnold1-1/+1
* Incompatible plugin API change -> sorted API. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16965 a1c6a512-1295-4272-9138-f99709370657
2008-03-09fix FS#8701 - metronome doesnt change back to ui font after drawingJonathan Gordon1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16585 a1c6a512-1295-4272-9138-f99709370657
2008-01-23Fixed the problems on the new version of the fire plugin (so repush it), ↵Kevin Ferrare1-21/+6
added new actions to the pluginlib_actions to fix the keymaps on the Sansa e200 for the clock and fire plugins. Also slightly simplified the metronome plugin's key mapping with those new actions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16148 a1c6a512-1295-4272-9138-f99709370657
2008-01-13Reenable metronome on Archos targets which got lost during the big change to ↵Marianne Arnold1-1/+1
it in last summer and fix a warning (wrong data type). The plugin button action system causes problems with the Ondio controls (tapping and playing conflict, even though there are exceptions defined) and it's only halfway usable, probably this applies to the Player as well but couldn't test. It is still better than nothing and e.g. metronome is not completely controllable on c200 too where it is also enabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16079 a1c6a512-1295-4272-9138-f99709370657
2008-01-10Accept FS#8341 - rename BUTTON_SCROLL_UP/DOWN to FWD/BACK on the e200 to ↵Jonathan Gordon1-1/+10
make it consistant with the ipods. apart from removing a bit of confusion, it fixes the wheel in pictureflow and possibly elsewhere. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16045 a1c6a512-1295-4272-9138-f99709370657
2007-07-29Fixed the metronome plugin crashing on target. Fixes <a ↵Kevin Ferrare1-42/+38
href='http://www.rockbox.org/tracker/task/7421'>FS#7421</a> git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14051 a1c6a512-1295-4272-9138-f99709370657
2007-07-29Least but not lastKevin Ferrare1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14048 a1c6a512-1295-4272-9138-f99709370657
2007-07-29How should I say ... oops ?Kevin Ferrare1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14047 a1c6a512-1295-4272-9138-f99709370657
2007-07-29Use multi-screen api for metronome plugin, and made it run in the simulator ↵Kevin Ferrare1-636/+38
by implementing the timer functions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14046 a1c6a512-1295-4272-9138-f99709370657
2007-06-14Move the MEM_FUNCTION_WRAPPERS macro into plugin.h and get rid of the extra ↵Nils Wallménius1-1/+0
header file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13628 a1c6a512-1295-4272-9138-f99709370657
2007-06-13Accept FS#7264 'Build with -Os switch for coldfire targets'.Nils Wallménius1-1/+4
Introduces MEM_FUNCTION_WRAPPERS(api) macro which adds wrappers functions to a plugin to make plugins link correctly when gcc calls mem* functions directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13625 a1c6a512-1295-4272-9138-f99709370657
2007-06-10Fix metronome errors for hw codec.Michael Sevakis1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13605 a1c6a512-1295-4272-9138-f99709370657
2007-06-10Plugins that play sound must be sure to set inputs and outputs on audio ↵Michael Sevakis1-3/+17
muxed targets. Add strict adherence to the interface protocols. Make sure playback sets the playback output as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13604 a1c6a512-1295-4272-9138-f99709370657
2007-04-12Fix metronome plugin crashing on SWCODEC targets and fixed a division by ↵Miika Pekkarinen1-2/+20
zero as well when tapping in the beat. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13129 a1c6a512-1295-4272-9138-f99709370657
2007-04-06Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold1-1/+1
like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
2006-12-04fix metronome sync buttonJonathan Gordon1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11657 a1c6a512-1295-4272-9138-f99709370657
2006-12-03oops, its not as simple as that...Martin Scarratt1-2/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11650 a1c6a512-1295-4272-9138-f99709370657
2006-12-03Enable syncing button in the metronome for I-RiversMartin Scarratt1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11649 a1c6a512-1295-4272-9138-f99709370657
2006-12-03#if != #ifdefJonathan Gordon1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11646 a1c6a512-1295-4272-9138-f99709370657
2006-11-26fix metronome keysJonathan Gordon1-5/+12
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11597 a1c6a512-1295-4272-9138-f99709370657
2006-11-17fix ondio keys, and tempo +/- on all targetsJonathan Gordon1-5/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11541 a1c6a512-1295-4272-9138-f99709370657
2006-11-16implement actions in the plugins, bubbles and metronome converted.Jonathan Gordon1-133/+47
(hopefully buttons are correct, let me know in http://forums.rockbox.org/index.php?topic=5829.0 if there is a major stuff up) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11535 a1c6a512-1295-4272-9138-f99709370657
2006-10-27Let SOURCES handle the sim exclusion for metronomeMartin Arver1-3/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11360 a1c6a512-1295-4272-9138-f99709370657