summaryrefslogtreecommitdiff
path: root/apps/plugins/random_folder_advance_config.c (follow)
Commit message (Collapse)AuthorAge
* plugins: Add plugin_release_audio_buffer().Thomas Martitz2014-04-09
| | | | | | | | | | | | | Some plugins grab the whole audio buffer and still want to start playback somehow (e.g. random_folder_advance_config). Since 22e802e the plugin buffer is allocated via buflib and has to be released explicitely. For these plugins the automatic free on exit is not sufficient and they need an API function for that. Fixes OOM panic on random_folder_advance_config when using start shuffled playback. Change-Id: I0d351daa782cb829f4ff80d34c05f40a2e0c142f
* Implement time-based resume and playback start.Michael Sevakis2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* Option to constrain get_next_dir() to directories below ↵Nick Peskett2012-03-19
| | | | | | | | | | | | | | global_settings.start_directory. When enabled, if the user has set "Start File Browser Here" (config.cfg: start directory) to anything other than root and "Auto-Change Directory" is set to "Yes" or "Random", the directory returned when an auto change is required will be constrained to the value of "start directory" or below. Change-Id: Iaab773868c4cab5a54f6ae67bdb22e84642a9e4b Reviewed-on: http://gerrit.rockbox.org/182 Reviewed-by: Nick Peskett <rockbox@peskett.co.uk> Tested-by: Nick Peskett <rockbox@peskett.co.uk>
* 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
* plugins: make local functions static for a subset of pluginsBertrik Sikken2011-09-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30564 a1c6a512-1295-4272-9138-f99709370657
* Blindly forcing stylus mode on plugin entry for an arbitrary subset of touch ↵Jonathan Gordon2011-02-27
| | | | | | targets is a *REALLY BAD IDEA* so do it properly so we dont have to revert any commits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29417 a1c6a512-1295-4272-9138-f99709370657
* Include config.h for strncmp RaaA maemo fixThomas Jarosch2011-02-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29393 a1c6a512-1295-4272-9138-f99709370657
* Ged rid of uisimulator/common/io.c for android builds.Thomas Martitz2010-09-01
| | | | | | | | | | | Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
* Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-24
| | | | | | | | | | | | | 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
* Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz2010-08-23
| | | | | | 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
* Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-23
| | | | | | | | | | | | | 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
* Fix size_t handling in plugin_get_buffer()Frank Gevaerts2010-05-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25884 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
* Make open() posix compliant api-wise. A few calls (those with O_CREAT) need ↵Thomas Martitz2010-05-06
| | | | | | the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
* Make creat() posix compliant API-wise. Shouldn't affect the core as it's ↵Thomas Martitz2010-05-06
| | | | | | wrapped via a static inline. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25843 a1c6a512-1295-4272-9138-f99709370657
* Simplify some boolean expressions that compare directly against 'true'Bertrik Sikken2010-01-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24144 a1c6a512-1295-4272-9138-f99709370657
* Correct checking return value of open in plugins.Teruaki Kawashima2009-12-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23874 a1c6a512-1295-4272-9138-f99709370657
* Make the formatter functions used by the settings return a pointer to avoid ↵Nils Wallménius2009-08-20
| | | | | | usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
* FS#10080Nils Wallménius2009-07-14
| | | | | | | | | | * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
* Fix returning too early (before cleanup) in RFAC, which led to not cancellingThomas Martitz2009-07-06
| | | | | | boosting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21682 a1c6a512-1295-4272-9138-f99709370657
* Adapt pictureflow and random_folder_advance_config to make use of the new ↵Thomas Martitz2009-07-05
| | | | | | | | | goto-wps exit feature. For pictureflow a menu item is added, but the key press that works in the filetree works also (unless it's already remapped), rfa will go to the wps after selecting "Play Shuffled", as it needs to exit then anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21681 a1c6a512-1295-4272-9138-f99709370657
* clarify error message a bitFrank Gevaerts2009-07-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21599 a1c6a512-1295-4272-9138-f99709370657
* Remove the static order[] allocation in favour of plugin_get_buffer()Frank Gevaerts2009-07-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21598 a1c6a512-1295-4272-9138-f99709370657
* Assume a smaller plugin binsize, so MAX_SHUFFLE_SIZE actually fits on archosFrank Gevaerts2009-07-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21597 a1c6a512-1295-4272-9138-f99709370657
* Add "Play Shuffled" menu item to random_folder_advance_config, which adds ↵Frank Gevaerts2009-07-01
| | | | | | | | | all configured configured directories to the current playlist in random order. (FS#10403) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21594 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#10094 by Teruaki Kawashima:Jonathan Gordon2009-06-16
| | | | | | | Replace the old menu API with the "new" one (a very long time overdue so huge thanks for the work.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21306 a1c6a512-1295-4272-9138-f99709370657
* loader-initialized global plugin API:Andrew Mahone2009-01-16
| | | | | | | | | | | | | | | | | 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
* New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg2008-11-20
| | | | | | | | | 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
* FS#9281 Rename of splash functions.Nils Wallménius2008-08-15
| | | | | | | | | | | | | | | | | | | | * Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
* fix FS#9120 by actually quiting random folder advance config after choosing ↵Jonathan Gordon2008-06-29
| | | | | | "ignore changes and quit" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17864 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
* Revert pointless change to random_folder_advance_config.cMarc Guay2008-06-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17802 a1c6a512-1295-4272-9138-f99709370657
* Add the Random Folder Advance feature to the manual, along with the plugin ↵Marc Guay2008-06-26
| | | | | | random_folder_advance_config, and a tiny bug fix in the plugin itself. Closes FS#7677. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17801 a1c6a512-1295-4272-9138-f99709370657
* Plugin parameters should be const.Steve Bavin2008-05-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7708 by John KaminarJonathan Gordon2008-04-24
| | | | | | | | Add ability to Export/Import the folder list to a plain text file so it can be easily modified on a computer. Also other minor code changes by me git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17237 a1c6a512-1295-4272-9138-f99709370657
* Pass the buffer length to the list_get_name callback functions instead of ↵Nils Wallménius2008-04-09
| | | | | | using hardcoded MAX_PATH git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
* the menu and list now accepts a parent viewport to draw in (and the menu can ↵Jonathan Gordon2008-03-26
| | | | | | be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
* minor update to gui_synclist_do_button() which will hopefully simplify ↵Jonathan Gordon2007-09-17
| | | | | | | | | things later. Now returns true if the action was handled in that function instead of returning the handled action. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14733 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7074 - choose which folders should be scanned and ignored using ↵Jonathan Gordon2007-08-05
| | | | | | the /.rockbox/folder_advance_dir.txt (paths prefixed by - will be skipped, otherwise they will be scanned) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14186 a1c6a512-1295-4272-9138-f99709370657
* Rockbox compiles and boots now on the 2nd gen, but doesn't work properly yet.Jens Arnold2007-07-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14021 a1c6a512-1295-4272-9138-f99709370657
* Move the old api out of the core and into the plugin lib.Jonathan Gordon2007-05-08
| | | | | | | ew plugins shuold use the new api and not this one. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13358 a1c6a512-1295-4272-9138-f99709370657
* Missed a couple. Hopefully fix all warnings.Michael Sevakis2007-04-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13234 a1c6a512-1295-4272-9138-f99709370657
* General housekeeping: Make plugin buffer functions take size_t * instead of ↵Michael Sevakis2007-04-21
| | | | | | int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
* Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold2007-04-06
| | | | | | like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
* Rename some macros to account for the recently added M5 port. No code changes.Jens Arnold2007-03-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12809 a1c6a512-1295-4272-9138-f99709370657
* Get rid of the 'center' parameter for splashes. There were only 2 of almost ↵Jens Arnold2007-03-16
| | | | | | 500 splashes which were not centered. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
* dont allow the volume setting to wrapJonathan Gordon2006-11-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11445 a1c6a512-1295-4272-9138-f99709370657
* Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the ↵Barry Wardell2006-10-26
| | | | | | nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11351 a1c6a512-1295-4272-9138-f99709370657
* dont display the folder count in the edit list windowJonathan Gordon2006-10-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11292 a1c6a512-1295-4272-9138-f99709370657
* Quick fix for the edit screen in the random_folder_advance_config plugin, no ↵Linus Nielsen Feltzing2006-10-09
| | | | | | more blank screen and it now shows the correct directory count git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11161 a1c6a512-1295-4272-9138-f99709370657